mIRC Home    About    Download    Register    News    Help

Print Thread
#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.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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!
Joined: Nov 2021
Posts: 87
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 87
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

Joined: Mar 2022
Posts: 15
Pikka bird
Offline
Pikka bird
Joined: Mar 2022
Posts: 15
Is this going to work on the Undernet server?
Sorry new to scripting and noticed "ChanServ" on the script

Thank you! blush


JilValentine | (Read error: EOF from client) | https://jilvalentine.de
Joined: Nov 2021
Posts: 87
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 87
there is no "chanserv" in the code so im not sure what you mean by that

Joined: Nov 2021
Posts: 87
Babel fish
Offline
Babel fish
Joined: Nov 2021
Posts: 87
oh i think you mean : var %exemptions = chanserv $me Hawk

those are the nicks that are exempted from the idle check


Link Copied to Clipboard