Jethro commented on a Page, Caps Kicker For A Bot  -  Jun 28, 2010

is there any way for this to warn the user 1 time and then just kick him every time he uses caps aftermichealkenny, here you go:

on @*:text:*:#:nocaps $1-
on @*:action:*:#:nocaps $1-
on @*:notice:*:#:nocaps $1-
alias -l nocaps {
  if (($nick isop #) && ($regex($1-,/^!caps (on|off|set) (\43\S+|\d+)/iS))) {
    goto $replace($regml(1),on,on,off,off,set,set) | :on
    if !$istok(%capschan,$regml(2),32) {
      set %capschan $addtok(%capschan,$regml(2),32)
      .msg # * My Caps Protection is now ON in: $regml(2) | halt
    }
    else { .msg # * Caps Protection is already ON for the channel: $regml(2) | halt }
    :off | if $istok(%capschan,$regml(2),32) {
      set %capschan $remtok(%capschan,$regml(2),1,32)
      .msg # * My Caps Protection is now OFF in: $regml(2) | halt
    }
    else { .msg # * Caps Protection is either removed or already OFF for the channel: $regml(2) | halt }
    :set | set %caps $regml(2) | .msg # * I Will Now Warn/Kick/Ban for %caps $+ % of Caps. | halt
  }
  else {
    if $findtok(%capschan,#,1,32) {
      var %percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
      if (($nick(#,$nick,vr)) && ($len($1-) > 5) && (%percent > %caps)) {
        inc -e $+(%,caps,.,$nick,.,#) | if $($+(%,caps,.,$nick,.,#),2) > 1 {
          kick # $nick You were warned one time not to use caps.
        }
        else {
          msg # $nick $+ , please DO NOT use caps.
        }
      }
    }
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.