Code:
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 
    }
  }
}

set %op on, then the script will also warn oped persons..
set %voice on, then the script will also warn voiced persons..
_____________ EDIT

If you want the script to 1 warn 2 kick 3 ban, then play a bit with user levels.

set %inptext $nick $+ : Using CAPS is considered shouting, so turn off your CAPSLOCK. | .auser CAPS1 $nick

on @CAPS1:text:*:#:{

and so on..

Last edited by sparta; 16/01/06 05:58 AM.