Many users need protection and channel management tools, here we supply everyone with the tools and knowledge you'll need to IRC safely and securely operate your channel. There are two sections, one for channel protection and the other for personal protection.
Channel Protection
Personal Protection
Caps Kicker |
Written by DeviL |
Are you sick of those people that continuously use CAPS in your channels? Then keep them out with this simple code:
alias allowedcaps { return 70 } on @*:TEXT:*:#:{ if ($len($1-) < 10) { return } var %caps.letters = $calc($len($1-) + 1 - $len($removecs(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) var %caps = $calc($len($1-) - $len($removecs($1-,($1-),A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) var %caps.percent = $round($calc(%caps / %caps.letters * 100),0) if ((%caps.percent > $allowedcaps) && ($nick !isop #)) { ban # $nick 2 kick # $nick Caps Allowed: $allowedcaps $+ $chr(37) Caps Used: %caps.percent $+ $chr(37) } }
The above code is simple and effective, you can just copy and paste it into your remotes.
alias allowedcaps { return 70 } ;this alias tells the following script that the allowed percentage for caps in a users text is 70 percent. Change the 70 to whatever suits you. on @*:TEXT:*:#:{ ;this event will only trigger in a channel, and only if youre opped in that channel if ($len($1-) < 10) { return } ;First checks to make sure they said more than 10 letters. var %caps.letters = $calc($len($1-) + 1 - $len($removecs(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) ;sets the number of letters in the text, and filters out symbols, signs etc. var %caps = $calc($len($1-) - $len($removecs($1-,($1-),A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) ;sets the number of caps in the text var %caps.percent = $round($calc(%caps / %caps.letters * 100),0) ;sets the percentage of caps in the text if ((%caps.percent > $allowedcaps) && ($nick !isop #)) { ;checks to see if the percent of caps is over the limit, and that the user is not opped ban # $nick 2 kick # $nick Caps Allowed: $allowedcaps $+ $chr(37) Caps Used: %caps $+ $chr(37) Kick/Bans the user from the channel } }
Now you can keep out those annoying users who continually use caps, with a few simple lines of coding.