#caps On
on @*:TEXT:*:#:{
var %n 2
if ($regex($nick($chan,$nick).pnick, /[~|@].*/) != 1) {
var %percentage 60
if ($calc($regex($1-,/[A-Z]/g) / $len($1-) * 100) > %percentage) {
if (%n < 3) {
inc $+(%,caps,.,$nick,.,$wildsite)
var %i $($+(%,caps,.,$nick,.,$wildsite),2)
if (%i < %n) {
msg $chan You are currently using too many captial letters. This is the $ord(%i) time that you have broken this rule. Please stop this conduct or immidiate action will be taken against you.
}
if (%i = 3) {
ban -ku120 # $nick You are using $calc($regex($1-,/[A-Z]/g) / $len($1-) * 100) percent caps. You have been warned before, you will now be banned.
unset $+(%caps,.,$nick,.,$wildsite)
}
}
}
}
}
on @*:ACTION:*:#:{
var %n 2
if ($nick isreg $chan) {
var %percentage 60
if ($calc($regex($1-,/[A-Z]/g) / $len($1-) * 100) > %percentage) {
if (%n < 3) {
inc $+(%,caps,.,$nick,.,$wildsite)
var %i $($+(%,caps,.,$nick,.,$wildsite),2)
if (%i < %n) {
msg $chan You are currently using too many captial letters. This is the $ord(%i) time that you have broken this rule. Please stop this conduct or immidiate action will be taken against you.
}
if (%i = 3) {
ban -ku120 # $nick You are using $calc($regex($1-,/[A-Z]/g) / $len($1-) * 100) percent caps. You have been warned before, you will now be banned.
unset $+(%caps,.,$nick,.,$wildsite)
}
}
}
}
}
#caps end
menu channel {
caps kicker $group(#caps).status:
.On/off:$iif($group(#caps).status = off, enable #caps, disable #caps)
}