mIRC Home    About    Download    Register    News    Help

Print Thread
#269907 12/02/22 09:09 AM
A
aamir
aamir
A
hello i need auto devoice on idle with message and idle time.

#269909 13/02/22 12:16 AM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
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!
#269913 13/02/22 04:39 PM
Joined: Nov 2021
Posts: 143
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 143
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
C
Pikka bird
Offline
Pikka bird
C
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

Joined: Nov 2021
Posts: 143
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 143
there is no "chanserv" in the code so im not sure what you mean by that

Joined: Nov 2021
Posts: 143
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 143
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