mIRC Home    About    Download    Register    News    Help

Print Thread
I Need Auto Devoice #269907 12/02/22 09:09 AM
Joined: Feb 2022
Posts: 1
A
aamir Offline OP
Mostly harmless
OP Offline
Mostly harmless
A
Joined: Feb 2022
Posts: 1
hello i need auto devoice on idle with message and idle time.

Re: I Need Auto Devoice [Re: aamir] #269909 13/02/22 12:16 AM
Joined: Feb 2003
Posts: 2,800
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,800
You'll just need to set a timer that checks everyone's idle times periodically, say, every 30 or 60 minutes, and then de-voice everyone in batches whose idle time exceeds the prerequisite, say, >2 hours of idle. You can choose to send messages to people after you devoice or before you devoice them using the same alias that's triggered by the periodic timer.

If you want me to write this for you, we can negotiate terms of pricing and feature creep.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: I Need Auto Devoice [Re: aamir] #269913 13/02/22 04:39 PM
Joined: Nov 2021
Posts: 20
Simo Offline
Ameglian cow
Offline
Ameglian cow
Joined: Nov 2021
Posts: 20
this seems to work well for me maroon helped me get it to work


Code
alias IdleDevoice {
  var %exemptions = chanserv $me Hawk
  var %c = $iif($1 ischan,$1,$active) , %i = 1
  while ($nick(%c,%i,v,oh).pnick) {
    var %pnick $v1 , %nick $nick(%c,%i,v,oh) , %umode $replace($remove(%pnick,%nick),+,v)

    if (!$istok(%exemptions,%nick,32) && $nick(%c,%nick).idle >= 1200) { var  %unset = %unset $+ %umode , %params = %params $str(%nick $+ $chr(32),$len(%umode)) }
    inc %i
  }

  if (%unset && %params)  { pushmodex  %c - $+ %unset %params  }
}



the pushmodex you can get online not sure if its allowed to use url here but the pushmodex helps to compress the mode settings if u need to push out multiple devoices in 1 go without spamming the channel withj multiple lines

Re: I Need Auto Devoice [Re: Simo] #270032 14/03/22 04:34 PM
Joined: Mar 2022
Posts: 3
C
CeraVea Offline
Self-satisfied door
Offline
Self-satisfied door
C
Joined: Mar 2022
Posts: 3
Is this going to work on the Undernet server?
Sorry new to scripting and noticed "ChanServ" on the script

Thank you! blush

Re: I Need Auto Devoice [Re: CeraVea] #270050 19/03/22 09:58 AM
Joined: Nov 2021
Posts: 20
Simo Offline
Ameglian cow
Offline
Ameglian cow
Joined: Nov 2021
Posts: 20
there is no "chanserv" in the code so im not sure what you mean by that

Re: I Need Auto Devoice [Re: Simo] #270082 28/03/22 11:48 AM
Joined: Nov 2021
Posts: 20
Simo Offline
Ameglian cow
Offline
Ameglian cow
Joined: Nov 2021
Posts: 20
oh i think you mean : var %exemptions = chanserv $me Hawk

those are the nicks that are exempted from the idle check