mIRC Homepage
Posted By: aamir I Need Auto Devoice - 12/02/22 09:09 AM
hello i need auto devoice on idle with message and idle time.
Posted By: Raccoon Re: I Need Auto Devoice - 13/02/22 12:16 AM
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.
Posted By: Simo Re: I Need Auto Devoice - 13/02/22 04:39 PM
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
Posted By: CeraVea Re: I Need Auto Devoice - 14/03/22 04:34 PM
Is this going to work on the Undernet server?
Sorry new to scripting and noticed "ChanServ" on the script

Thank you! blush
Posted By: Simo Re: I Need Auto Devoice - 19/03/22 09:58 AM
there is no "chanserv" in the code so im not sure what you mean by that
Posted By: Simo Re: I Need Auto Devoice - 28/03/22 11:48 AM
oh i think you mean : var %exemptions = chanserv $me Hawk

those are the nicks that are exempted from the idle check
© mIRC Discussion Forums