Mass Kick Protection
Written by Kintar0

Prevent takeover's or accidental mass kicks by a user. If a user doesn't have access to ChanServ or your network's channel services, this should work out pretty well. The code goes into mIRC remotes.

on @!*:kick:#: { if (%kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] == $null) { set -u8 %kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] 1 return } else { inc %kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] } if (%kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] > 3 && %kicks.check == $null) { set -u6 %kicks.check 1 raw -q mode # -o+b $nick $wildsite kick # $nick Do not mass kick users! } }

This code listens to kicks from a user on a channel, if the number of kicks exceed 3 within 8 seconds, mIRC deop's and kick/bans the user. You can copy/paste the code above into remotes and have it work fine. The code below explains the code line by line.

on @!*:kick:#: { ; Listens to kicks when you're op and not doing the kick if (%kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] == $null) { ; Checks for kick records from $nick set -u8 %kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] 1 return ; If there are no records, mIRC creates a variable to store info ; You can change 8 to change the duration... } else { inc %kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] } ; If records exist, mIRC increases the amount of kicks by $nick if (%kicks. [ $+ [ $nick ] $+ . $+ [ $chan ] ] > 3 && %kicks.check == $null) { ; Checks if $nick has over 3 kicks on $chan ; Also checks %kick.check if it exists so you dont try to kick/ban more than once ; You can change 3 to fit your limits... set -u6 %kicks.check 1 raw -q mode # -o+b $nick $wildsite kick # $nick Do not mass kick users! Kick, ban, and deop user for mass kicking } }

If you find any errors or have any questions/comments, please contact us via email, memo, or our script forum. Thanks for your time.

2000-2001 ClanX Scripterz Organization