This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

looking for special caps.tcl

Old posts that have not been replied to for several years.
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

looking for special caps.tcl

Post by Mackenzie »

Hello all,

i'm looking for a caps kicker who kick on caps and tell in the channel howmany percent caps are used

example:

[11:08] <Test> WOOOOHOOOOOOOOOOOOOOOOOOOO
[11:08] *** Test was kicked by @CapsBot (*** NO *** caps please!!!) (100% caps)

can somebody help mé pleace?

greetz
Mack
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all


#Set this to the minimum string wize, before it will act
#IE, set 6, "HELLO" = no kick, "HELLO ALL" = kick
set cap_min 6

#set this tot he percentage, wihtout any percentage char
#IE, 50
set cap_per 50

bind msgm - "*" cap:perc:kick
proc cap:perc:kick {nick uh hand chan arg} {
  global cap_per cap_min
  if {[string length $arg] <= $cap_min} { return }
  set full [string length $arg]
  regsub -all {[A-Z]} $arg "" arg
  set perc [expr (($full - [string length $arg]) / $full) * 100]
  if {$perc >= $cap_per} {
    putserv "KICK $chan $nick :*** NO *** caps please!!!) ([string range $perc 0 5])"
  }
}
Not tested.
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Post by Mackenzie »

goedmorning ppSlim

nope...no results

[11:53] <+Mackie> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDD

greetz Mack
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

if u change

Code: Select all

bind msgm - "*" cap:perc:kick 
to

Code: Select all

bind pubm - "*" cap:perc:kick 
it should work
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I honest to god, don't know how that got there.

I swear.

I guess I gotta file a case against Red Bull for not kicking in quick enough.
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

caos.tcl

Post by Mackenzie »

nope still won't work

I've got this now

#########################################
# capsGF.tcl (GF stands for G-Force bot)
# credits goes to:
# ppslim, Papillon
#
#########################################
#
#Set this to the minimum string wize, before it will act
#IE, set 6, "HELLO" = no kick, "HELLO ALL" = kick
set cap_min 6

#set this tot he percentage, wihtout any percentage char
#IE, 50
set cap_per 50

bind pubm - "*" cap:perc:kick
proc cap:perc:kick {nick uh hand chan arg} {
global cap_per cap_min
if {[string length $arg] <= $cap_min} { return }
set full [string length $arg]
regsub -all {[A-Z]} $arg "" arg
set perc [expr (($full - [string length $arg]) / $full) * 100]
if {$perc >= $cap_per} {
putserv "KICK $chan $nick :*** NO *** caps please!!!) ([string range $perc 0 5])"
}
}

greetz
Mack
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

hmmm I tried it, it kicked me on 100% caps but when I had any other letters it did nothing...
Elen sila lúmenn' omentielvo
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Post by Mackenzie »

jups same here

[13:24] <Mackie> TTTTTTTTTTEEEEEEEEEESSSSSSSSSSTTTTTTTTTTEEEEEEEEEE E
[13:25] <Mackie> TTTTTTTTTTEEEEEEEEEESSSSSSSSSSTTTTTTTTTTEEEEEEEEEE EE
[13:26] <Mackie> TTTTTTTTTTEEEEEEEEEESSSSSSSSSSTTTTTTTTTTEEEEEEEEEEAAAAA
[13:26] *** Mackie was kicked by @G-Force (*** NO *** caps please!!!) (100))

it works almost fine :wink:

is it also possibel to set (100) to (100% caps) ?

greetz
Mack
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

change this:

Code: Select all

putserv "KICK $chan $nick :*** NO *** caps please!!!) ([string range $perc 0 5])"
to this:

Code: Select all

putserv "KICK $chan $nick :*** NO *** caps please!!!) ([string range $perc 0 5]% caps)" 
Elen sila lúmenn' omentielvo
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

I run a bit more testing on the script and I think I fixed it, just by remodeling the expr a bit it seems to be working

Code: Select all

#Set this to the minimum string wize, before it will act 
#IE, set 6, "HELLO" = no kick, "HELLO ALL" = kick 
set cap_min 6 

#set this tot he percentage, wihtout any percentage char 
#IE, 50 
set cap_per 50 

bind pubm - "*" cap:perc:kick 
proc cap:perc:kick {nick uh hand chan arg} { 
  global cap_per cap_min 
  if {[string length $arg] <= $cap_min} { return } 
  set full [string length $arg] 
  regsub -all {[A-Z]} $arg "" arg
  putlog "$arg"
  set perc [expr (($full - [string length $arg]) * 100) / $full] 
  putlog "$perc"
  if {$perc >= $cap_per} { 
    putserv "KICK $chan $nick :*** NO *** caps please!!!) ([string range $perc 0 5]% caps)" 
  } 
} 
Elen sila lúmenn' omentielvo
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

just remove those putlog.... :D used them to check if it was calcing properly ;)
Elen sila lúmenn' omentielvo
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Post by Mackenzie »

works almost great...

[14:12] <evo> even iets testen --> JOIN a GOOd CHAn MANNEke

nothing happend cause it don't recognice teh first lower case
then next test

[14:12] <evo> > JOIN a GOOd CHAn MANNEke
[14:12] *** evo was kicked by @G-Force (*** NO *** caps please!!!) (57% caps))

this is great

Mack
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

works almost great...

[14:12] <evo> even iets testen --> JOIN a GOOd CHAn MANNEke

nothing happend cause it don't recognice teh first lower case
then next test
eh are u sure that's why? "even iets testen --> JOIN a GOOd CHAn MANNEke " is just 32% caps :)
Elen sila lúmenn' omentielvo
M
Mackenzie
Voice
Posts: 36
Joined: Sun Jul 28, 2002 2:08 pm
Location: Belgium
Contact:

Post by Mackenzie »

test

[14:24] <Mackie> oki we try start with lowercase AND THEN CAPS BEHIND
[14:24] <Mackie> AND NOW CAPS IN FRONT lower case behind
[14:25] <Mackie> AND NOW CAPS IN FRONT NOTHING BEHIND
[14:25] *** Mackie was kicked by @G-Force (*** NO *** caps please!!!) (81% caps))

it don't recognice the lowercase :wink:

Mack
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

oki we try start with lowercase AND THEN CAPS BEHIND = 32% caps
AND NOW CAPS IN FRONT lower case behind = 42% caps
AND NOW CAPS IN FRONT NOTHING BEHIND = 81% caps
AAAAAAAAAAAAAAAAAAA = 100% caps

it recognises lowercaps ;) it just don't do anything unless it is more than 50% caps.....
taht's what the "set cap_per 50" is 4
change it if u want
Elen sila lúmenn' omentielvo
Locked