Advertisement
westor

Check Idle Auto Deop for niemand v1.1

Apr 27th, 2023 (edited)
2,528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.68 KB | None | 0 0
  1. alias -l exceptions { return nick1 nick2 nick3 } ; Add nicks here (separated by space)
  2.  
  3. ON ME:*:JOIN:#dardania: { .timer[CHECK_ $+ $chan $+ _IDLE] 0 60 check_idle $chan 600 }
  4.  
  5. alias check_idle {
  6.   ; /check_idle <#Channel> <Seconds>
  7.  
  8.   if (!$1) || (!$2) || (!$isnum($2)) || ($me !ison $1) || ($me !isop $1) { return }
  9.  
  10.   var %t = $nick($1,0,o)
  11.  
  12.   if (!%t) || (%t == 1) { return }
  13.  
  14.   var %i = 1
  15.  
  16.   while (%i <= %t) {
  17.     var %n = $nick($1,%i,o)
  18.     var %e = $nick($1,%i,o).idle
  19.  
  20.     if (%n ison $1) && (%n !== $me) && (!$istok($exceptions,%n,32)) && (%e) && (%e > $2) { var %k = $addtok(%k,%n,32) }
  21.  
  22.     inc %i
  23.   }
  24.  
  25.   if (%k) { mode $1 $+(-,$str(o,$numtok(%k,32))) %k }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement