mIRC Home    About    Download    Register    News    Help

Print Thread
#172028 04/03/07 08:19 AM
R
reload00
reload00
R
Hi guys
How can we do this script to work with one warning first and then
if continues to kick banned the user?

on @*:TEXT:*:#: {
if ($len($1-) < 9) || ($nick isop #) return
var %text = $strip($remove($1-,$chr(32)))
var %non.caps = $len($removecs(%text,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 %full.line = $len(%text)
var %percent = $calc(1 - (%non.caps / %full.line))
if (%percent >= 0.8) {
ban -u60 # $nick 11
kick # $nick Your text contains $calc(%percent * 100) percent caps. This is not acceptable
}
if ($calc($count($1-,?) + $count($1-,!)) >= 10) {
ban -u6o # $nick 11
kick # $nick You used too many !?'s ( $+ $count($1-,?) $+ ?'s and $count($1-,!) $+ !'s)
}
}

#172095 05/03/07 02:11 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
I don't have time to write up the warning/ban thing (it's basically just setting a variable or using a hash table or whatever for each nick, but I need to leave for work soon), but just as a word of warning... your script will warn/kick/ban someone who says:

LOL

You may want to set it to only do it if the total $len of the text (including caps) is > 6 or something like that.


Link Copied to Clipboard