caps kicker

By BytchAmy on Sep 30, 2007

THis is a pretty good caps kicker kicks at 70% caps used & tells the user kicked how many caps they have used out of the allowed caps.

menu menubar {
  Caps Kicker  ( $+ $group(#caps) $+ )
  ..$iif($group(#caps) == on,$style(2),$style(0)) On:{ .enable #caps | echo $active 0,12Caps Kicker 0,94Enabled }  
  ..$iif($group(#caps) == off,$style(2),$style(0)) Off:{ .disable #caps  | echo $active 0,12Caps Kicker 0,94Disabled }

#caps on
on ^*:TEXT:*:*:{ 
  if ($len($1-) < 20) { return }
  var %caps.letters = $calc($len($1-) + 1 - $len($removecs(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)))
  var %caps = $calc($len($1-) - $len($removecs($1-,($1-),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)))
  var %caps.percent = $round($calc(%caps / %caps.letters * 100),0)
  if ((%caps.percent > $allowedcaps) && ($nick !isop $active)) { 
    /kick $active $nick Caps Allowed $allowedcaps $+ $chr(37) You Used %caps.percent $+ $chr(37) BYE!!
alias allowedcaps { return 70 }
#caps end


Sign in to comment.
H2O   -  Jun 23, 2011

This is working odd for me. It will work in one channel, but when i test it in another channel it will kick me from the first channel i tested it on, not the second. Any tips or a link to a better one? Im looking for one without a ban.

Jethro   -  Jan 14, 2010

You did it wrong. This is how you do it:

on ^*:TEXT:*:#chan1,#chan2,#chan3,#chan4: {

Also, you need to be aware that $chan in private message becomes $null.

Klasic Kumputerz   -  Jan 14, 2010

How can you make this channel specific? I have tried to add channel name(s) to it and it renders the script none working.


on ^:TEXT:#channelname::*:{

BytchAmy   -  Jan 28, 2008

thanks for your comments :)

KuTsuM   -  Oct 03, 2007

Whoops I meant .7 not .5 :)

KuTsuM   -  Oct 03, 2007

First thing. You can\'t kick someone who\'s talking to you in a query. You can do this however:
if ($chan) { kick $v1 $nick blah blah }
else { close -m $nick }

Also, the above would work, but you can use this for shorter code too:

on :TEXT::#: {
var %x = 1,%y
while (%x <= $len($1-)) {
if ($right($left($1-,%x),1) isupper) inc %y
inc %x
if (%y > $calc($len($1-) * .5)) { do action... }

Kyousoukyoku   -  Oct 01, 2007

you don\'t really need th $allowedcaps. You can just have a local variable. And you should use $regex as napa said. Really nice work BytchAmy. =)

napa182   -  Sep 30, 2007

you can use

if ($len($1-) > 5) {
    var %percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
    if (%percent > %caps) {

then you can have a way to set the percent of caps you want to kick for like

alias capset { set %caps $1 | echo -a I will Now Kick For $1 $+ % Caps }

or what ever

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.