Ok, try this code then. It has a minimum limit for length.

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 

RED = ignore text that is less than or equal to 5 characters in length
GREEN = ignore text that has less than or equal to 50% uppercase characters.