ON @*:TEXT:*:#: {
if ($($+(%,spamcaps.,$chan),2)) {
if ($($+(%,permit.,$nick),2)) { RETURN }
ON @*:TEXT:*:#: {
IF (($len($1-) < 55) || ($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($strip($remove(%text,$chr(32))))
VAR %percent = $calc(1 - (%non.caps / %full.line))
IF (%percent >= 0.9) {
if (%spamcheck) { msg # /timeout $nick 30 }
msg # $nick --> Please don't type in all caps
.timer[caps1] 1 1 msg # /timeout $nick 30
set -u20 %spamcheck ON
}
}
}
}