Caps Kicker

By Cypher87 on Mar 06, 2004

Capskicker for bots:
Type: !capskick on , to turn the capskicker on
Type: !capskick off , to turn the capskicker off
Type: !capskick set [N] , to set the allowed percent of caps. [N] is the amount of caps alllowed.

on *:text:*:#: {
  if ($me isop $chan) {
    if ($nick !isop $chan) {
       if (%capskick == on) && ($len($1-) > 5) {
        set %caps.percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
        if (%caps.percent > %caps.allowed) {
          inc %kick
          kick $chan $nick $round(%caps.percent,0) $+ % CAPS! 4[ $+ %kick $+ ]
        }
      }
    }
  }
  if ($1 == !capskick) {
    if ($nick isop $chan) {
      if ($2 == on) { set %capskick on | msg $chan Capskick is on }
      if ($2 == off) { set %capskick off | msg $chan Capskick is off }
      if ($2 == set) { set %caps.allowed $3 | msg $chan Caps allowed set to %caps.allowed $+ % }
    }
  }
}

Comments

Sign in to comment.
Jethro   -  Feb 28, 2011

Which one are you using? The snippet or the one I showed above?

 Respond  
FullMetalAlchemist   -  Feb 28, 2011

Mhm, can anyone help me, for some reason when people use ,.-!" and such, it doesn't active =\ any way to make it ignore those symbols and still work.

 Respond  
Jethro   -  Mar 07, 2010

jackster35-1, this caps kicker works very well for me:

on @*:text:*:*:caps $strip($1-)
on @*:action:*:*:caps $strip($1-)
on @*:notice:*:*:caps $strip($1-)
alias -l caps {
  var %. ,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,%; $len($remove($1- [ %. ] )),%: $len($1-) - %;
  if ($calc(100*($len($removecs($1- [ %. ] ))-%;)/%:) > 50) && (%: > 5) { var %chan #YourChannel
    set -u $+(%,c,$chr(32),$int($ifmatch)) | kick %chan $nick You've used $+(%c,%) of CAPS!
  }
}

All you need to do is replace #YourChannel with the channel you want to work in. The percentage is adjustable under > 5
The bigger the number, the less strict it becomes.

 Respond  
jackster35-1   -  Mar 07, 2010

i want to be set for only 1 channel no all of them

 Respond  
sith_   -  Jun 05, 2007

It doesn\'t work for me ;[

 Respond  
`IceMan`   -  Aug 16, 2005

I have a suggestion, add ban $chan $nick $address to perminently ban the user, I notice when user gets kicked they rejoin. Defeats the whole purpose of the script and your efforts. Well it was just a suggestion. Great script , it works for me.

ban $chan $nick $address
kick $chan $nick $round(%caps.percent,0) $+ % CAPS! 4[ $+ %kick $+ ]

 Respond  
Cypher87   -  Apr 02, 2004

You don\'t need to change it anymore ;)

 Respond  
DarkSoul   -  Apr 01, 2004

do u mean just change \"if (%capskick == on) {\"? or the whole thing on that line?

 Respond  
Cypher87   -  Mar 06, 2004

Hmm, I made a little mistake >.< , change if (%capskick == on) { into if (%capskick == on) && ($len($1-) > 5) { .

 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.