on *:text:*:#:{
if (%caps.floodprotection) return
if ($len($1-) <= [color:red]5[/color]) return
var %pcnt = $calc($regex($1-,/[A-Z]/g) / $len($1-) * 100)
if (%pcnt <= [color:green]50[/color]) return
set -u2 %caps.floodprotection
msg $chan Stop talking in $round(%pcnt,2) $+ % and stuff $nick
}