on @*:text:*:#:{
set %cpschan $chan
if (%op == off) && ($nick isop $chan) { return }
if (%voice == off) && ($nick isvo $chan) { return }
else {
var %p = $int($calc(($regex($1-,/[A-ZÄÖ]/g) / $len($1-)) * 100))
if (%p > 75) && (!$hget($+(warn,$cid,$chan),$nick)) {
hinc -m $+(warn,$cid,$chan) $nick
set %inptext $nick $+ : Using CAPS is considered shouting, so turn off your CAPSLOCK.
}
elseif (%p > 75) && ($len(%matchtxt) > 5) && ($hget($+(warn,$cid,$chan),$nick)) {
set %inptext $nick $+ : Using CAPS is considered shouting, so turn off your CAPSLOCK.
hdel $+(warn,$cid,$chan) $nick
}
}
}