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

is there a way to make it so that when a an op types !caps on/off
you don't have to enter the channel name. it sets it off/on in the channel where !caps on/off was typed.Keon191, 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\s(\d+))/iS))) {
    goto $replace($regml(1),on,on,off,off,set,set) | :on
    if !$istok(%capschan,#,32) {
      set %capschan $addtok(%capschan,#,32)
      .msg # * My Caps Protection is now ON in: # | halt
    }
    else { .msg # * Caps Protection is already ON for the channel: # | halt }
    :off | if $istok(%capschan,#,32) {
      set %capschan $remtok(%capschan,#,1,32)
      .msg # * My Caps Protection is now OFF in: # | halt
    }
    else { .msg # * Caps Protection is either removed or already OFF for the channel: # | 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 $+(%,caps,.,$nick,.,#) | if $($+(%,caps,.,$nick,.,#),2) >= 3 {
          ban -ku600 # $nick 2 You were warned not to use caps. $&
            $round(%percent,0) $+ % of your message was in caps.
          unset $+(%,caps,.,$nick,.,#)
        }
        elseif $($+(%,caps,.,$nick,.,#),2) = 2 {
          kick # $nick Please turn caps lock off or next offense is going to be a ban. $&
            $round(%percent,0) $+ % of your message was in caps!
        }
        else {
          msg # $nick $+ , please DO NOT use caps. $round(%percent,0) $+ % of your message was in caps!
        }
      }
    }
  }
}
dma  -  Nov 23, 2015

very good

Sign in to comment

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.