| Control Code Kicker |
| Written by BrainPhreeze |
Are you sick of those people that continuously use an excessive amount of control codes in your channels? Then keep them out with this simple code:
alias max.controlcodes { return 15 } on @*:TEXT:*:#:{ var %c.c $calc($count($1-,$chr(3)) + $count($1-,$chr(2)) + $count($1-,$chr(22)) + $count($1-,$chr(31))) if (%c.c > 15 && $nick isreg #) { ban # $nick 2 kick # $nick Control Codes Allowed: $max.controlcodes / Control Codes Used: %c.c } }
The above code is simple and effective, you can just copy and paste it into your remotes.
alias max.controlcodes { return 15 } ;this alias tells the following script that the maximum control codes allowed in a users text is 15. Change the 15 to whatever suits you. on @*:TEXT:*:#:{ ;this event will only trigger in a channel, and only if youre opped in that channel. var %c.c $calc($count($1-,$chr(3)) + $count($1-,$chr(2)) + $count($1-,$chr(22)) + count($1-,$chr(31))) ;sets the number of control codes used in the text. if (%c.c > 15 && $nick isreg #) { ;checks to see if the number of control codes is over the limit, and that the user is not opped/voiced. ban # $nick 2 kick # $nick Control Codes Allowed: $max.controlcodes / Control Codes Used: %c.c ;Kick/Bans the user from the channel. } }
Now you can keep out those annoying users who continually use excessive control codes, with a few simple lines of coding.
© 2000-2001 ClanX Scripterz Organization