rendered paste bodyon *:TEXT:*:#: { if ($chan isin %capsabuse) && ($nick !isop $chan) {
if ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).caps >= 65) && ($len($1-) >= 20) {
kick $chan $nick 4Massive use of CAPS is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of CAPS is forbidden - you haven been logged
}
elseif ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).bold == 100) && ($len($1-) >= 20) {
mode $chan -o $nick
kick $chan $nick 4Massive use of controlcodes like CTRL+B is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of controlcodes like CTRL+B is forbidden - you haven been logged
}
elseif ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).underline == 100) && ($len($1-) >= 20) {
mode $chan -o $nick
kick $chan $nick 4Massive use of controlcodes like CTRL+U is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of controlcodes like CTRL+U is forbidden - you haven been logged
}
elseif ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).color == 100) && ($len($1-) >= 20) {
mode $chan -o $nick
kick $chan $nick 4Massive use of controlcodes like CTRL+K is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of controlcodes like CTRL+K is forbidden - you haven been logged
}
elseif (( %capsabuseuser. [ $+ [ $nick ] ] == 1 ) && ($len($1-) >= 20) && (($lineinfo($1-).caps >= 65) || ($lineinfo($1-).bold == 100) || ($lineinfo($1-).underline == 100) || ($lineinfo($1-).color == 100))) {
mode $chan -o $nick
ban -u3600 $chan $nick
kick $chan $nick 4Massive use of CAPS (capital letters), controlcodes like CTRL+B, +U or +K are forbidden. Banned for 1 hour.
set -u3600 %capsabuseuser. [ $+ [ $nick ] ] 2
.notice $nick last warning - Massive use of CAPS, controlcodes like CTRL+B, +U or +K are forbidden - you haven been logged
}
elseif (( %capsabuseuser. [ $+ [ $nick ] ] == 2 ) && ($len($1) >= 20) && (($lineinfo($1).caps >= 65) || ($lineinfo($1-).bold == 100) || ($lineinfo($1-).underline == 100) || ($lineinfo($1-).color == 100))) {
mode $chan -o $nick
ban $chan $nick
kick $chan $nick 4Massive use of CAPS (capital letters), controlcodes like CTRL+B, +U or +K are forbidden. Perm BAN.
unset %capsabuseuser. [ $+ [ $nick ] ]
}
}
}
on *:ACTION:*:#: { if ($chan isin %capsabuse) && ($nick !isop $chan) {
if ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).caps >= 65) && ($len($1-) >= 20) {
kick $chan $nick 4Massive use of CAPS is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of CAPS is forbidden - you haven been logged
}
elseif ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).bold == 100) && ($len($1-) >= 20) {
mode $chan -o $nick
kick $chan $nick 4Massive use of controlcodes like CTRL+B is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of controlcodes like CTRL+B is forbidden - you haven been logged
}
elseif ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).underline == 100) && ($len($1-) >= 20) {
mode $chan -o $nick
kick $chan $nick 4Massive use of controlcodes like CTRL+U is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of controlcodes like CTRL+U is forbidden - you haven been logged
}
elseif ( %capsabuseuser. [ $+ [ $nick ] ] == $null ) && ($lineinfo($1-).color == 10) && ($len($1-) >= 20) {
mode $chan -o $nick
kick $chan $nick 4Massive use of controlcodes like CTRL+K is forbidden.
set -u1800 %capsabuseuser. [ $+ [ $nick ] ] 1
.notice $nick first warning - Massive use of controlcodes like CTRL+K is forbidden - you haven been logged
}
elseif (( %capsabuseuser. [ $+ [ $nick ] ] == 1 ) && ($len($1-) >= 20) && (($lineinfo($1-).caps >= 65) || ($lineinfo($1-).bold == 100) || ($lineinfo($1-).underline == 100) || ($lineinfo($1-).color == 100))) {
mode $chan -o $nick
ban -u3600 $chan $nick
kick $chan $nick 4Massive use of CAPS (capital letters), controlcodes like CTRL+B, +U or +K are forbidden. Banned for 1 hour.
set -u3600 %capsabuseuser. [ $+ [ $nick ] ] 2
.notice $nick last warning - Massive use of CAPS, controlcodes like CTRL+B, +U or +K are forbidden - you haven been logged
}
elseif (( %capsabuseuser. [ $+ [ $nick ] ] == 2 ) && ($len($1) >= 20) && (($lineinfo($1).caps >= 65) || ($lineinfo($1-).bold == 100) || ($lineinfo($1-).underline == 100) || ($lineinfo($1-).color == 100))) {
mode $chan -o $nick
ban $chan $nick
kick $chan $nick 4Massive use of CAPS (capital letters), controlcodes like CTRL+B, +U or +K are forbidden. Perm BAN.
unset %capsabuseuser. [ $+ [ $nick ] ]
}
}
}
menu channel {
Advertise Protection
.Caps Abuse on://set %capsabuse %capsabuse $chan | echo -a 5-][-Channel now on Caps abuse protection list-][-
.Caps Abuse off://set %capsabuse $remove(%capsabuse,$active) | echo -a 5-][-Channel now off Caps abuse protection list-][-
}
alias lineinfo {
if ($prop == caps) { return $calc($regex($1-,/[A-ZÄÖÜ]/g) * 100 / $len($strip($1-))) }
elseif ($prop == bold) || ($prop == underline) || ($prop == reverse) {
var %i 1,%o 0,%r = $iif($prop == bold,$regex($1-,/\002([^\002]+)\002?/g),$iif($prop == underline,$regex($1-,/\037([^\037]+)\037?/g),$regex($1-,/\026([^\026]+)\026?/g)))
while (%i <= %r) { inc %o $len($strip($regml(%i)))) | inc %i }
return $calc(%o * 100 / $len($strip($1-)))
}
elseif ($prop == color) {
var %i 1,%o 0,%r = $regex($1-,/\003\d\d?(.\d\d?)?([^(\003\d\d?(.\d\d?)?)?]+)/g)
while ($regml(%i)) { if ($left($regml(%i),1) != $chr(44)) { inc %o $len($strip($regml(%i)))) } | inc %i }
return $calc(%o * 100 / $len($strip($1-)))
}
}