###################################### # Check Idle Addon # # by evol # # @ evolish.undernet.org # # works under mIRC higher than 6.03 # ###################################### alias checkidle { unset %tmpcheck set %idlechan $active if ($left(%idlechan,1) != $chr(35)) { echo -a This is not a channel - Process halted [Usage: /checkidle in a channel window] | return } echo -a >>> Starting Scanning Channel Idle time for %idlechan idlesetup } alias idlesetup { if ($dialog(idlecheck) == $null) { dialog -m idlecheck idlecheck } } dialog idlecheck { title "Idle Check" size -1 -1 400 350 button "&Okay", 1, 20 270 70 20,ok list 2, 10 20 380 255, vsbar box Nick $chr(124) Address, 3, 5 5 390 260 text "Double Click on a nick to kick/ban him", 8, 110 270 370 45 text "User(s) Kicked", 11, 80 316 370 45 edit - $+ %idlekick $+ -, 10, 15 315 60 20,read center } on *:dialog:idlecheck:dclick:2:{ realidle %idlechan $gettok($did($dname,2).seltext,1,124) did -d idlecheck 2 $did(2).sel 1 inc %idlecheck } on *:dialog:idlecheck:init:*:{ unset %tmpcheck var %x = 1 while ($nick(%idlechan,%x)) { if ($nick(%idlechan,$v1).idle > 30) { did -a idlecheck 2 $nick(%idlechan,%x) $chr(124) $address($nick(%idlechan,%x),2) inc %tmpcheck } inc %x } if (!%tmpcheck) { echo -a >>> No users with idle more than an hour found. | dialog -x idlecheck } else { echo -a >>> %tmpcheck users found with an idle time of more than an hour } } alias realidle { set -u20 %idle [ $+ [ $2 ] ] $1 whois $2 $2 } raw 317:*: { if (%idle [ $+ [ $2 ] ]) { ;checking if it's for user already chosen. if ($3 > 30) { echo -a >>> $+($2,'s) actual idle time was more than an hour $+([,$duration($3),]) - Trying to deop... mode %idle [ $+ [ $2 ] ] -o $2 } else { echo -a The Actual Idle time of $2 is $duration($3) and therefore process halted. } } }