sorry
Code:
  on @*:TEXT:*:#: {
  if ($len($1-) > 9) || ($nick isop #) return
  var %text = $strip($remove($1-,$chr(32)))
  var %non.caps = $len($removecs(%text,$regex($1-,/[A-Z]/g))
  var %full.line = $len($strip($remove(%text,$chr(32))))  
  var %percent = $calc(1 - (%non.caps / %full.line))
  if (%percent >= 0.8) {
    inc %warn2. [ $+ [ $nick ] ] 
    if %warn2. [ $+ [ $nick ] ] == 1 { notice $nick first warning $nick $+ , do not type in full caps. This is an automated message, Do Not Respond Back. }
    elseif %warn2. [ $+ [ $nick ] ] == 2 { notice $nick last warning $nick $+ , do not type in full caps on this channel! This is an automated message, Do Not Respond Back. }
    elseif %warn2. [ $+ [ $nick ] ] == 3 { 
      gag $nick | Your text contains $calc(%percent * 100) %$+caps. This is not acceptable.  You were already warned two times because of your abuse of caps.
      unset %warn2. [ $+ [ $nick ] ]
    }