I found a snippet code and decided to use it for my twitch bot. I edited it to my requests:
1. give a warning on first 70% caps message
2. time out on 2nd caps if it ghas been less than 5 minutes from last caps message
My bot says "stop typing in caps! [warning]" on first message without timing out, and on 2nd message it does time them out, BUT it says the same [warning] message. How would i get it to not say warning on 2nd time out?

Code:
on *:text:*:#:{
  if ($nick isop #) { halt }
  if ( $len($1-) >= 10 ) {
    if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) { msg $chan $nick -> stop typing in caps! [warning] }
    write capsban.txt $nick
    .timerCapsBan 1 300 CapsBan # $nick
  }
}
alias -l CapsBan {
  write $+(-ds,$nick) capsban.txt
}


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball