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.

antilamer - control code, caps, etc. control

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

antilamer - control code, caps, etc. control

Post by De Kus »

This script does has various feature, some are well know, some are probably unique:
  • toggleable warning before kick
  • bans repeated offense (after kick)
  • Kicks abusive use of CAPS, ASCII Codes and Screams
  • Kicks use of control codes, if their affected characters exceed a limit
    so writing a whole in color might be already worth a kick, while writing a few chars in color will never, nethertheless how many control codes are used, unless they exceed the total limit (set to reduce CPU usuage in tsunami floods)
  • customable kick/ban reasons. the script tries to determine what the user was actually kicked for
I am greatfull for any bug reports and tips of execution time optimizing without changing capitlities.

General idea from lamer.tcl by cmouse, but this is a complete new script (I completely wrote it vom scratch. Just giving credit for the idea of regexp counting).

Download v0.1.9:
http://home.arcor.de/dekus/antilamer.zip
http://home.arcor.de/dekus/antilamer.tar.bz2
Last edited by De Kus on Wed Jun 20, 2007 12:37 pm, edited 4 times in total.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
dotslasher
Halfop
Posts: 62
Joined: Sun Aug 10, 2003 8:10 pm

Post by dotslasher »

looks interesting De Kus, i'll start using/testing it right away.

i have a small question: how would you translate "Hervorhebungen"?
User avatar
dotslasher
Halfop
Posts: 62
Joined: Sun Aug 10, 2003 8:10 pm

Post by dotslasher »

this happened when doing !! ?? .. or __ abuse
[01:38:11] [Beholder]: Tcl: can't read "bnick": no such variable
[01:38:11] [Beholder]: Tcl: while executing
[01:38:12] [Beholder]: Tcl: "getchanhost $bnick $chan"
[01:38:12] [Beholder]: Tcl: (procedure "anti:lamer" line 85)
[01:38:12] [Beholder]: Tcl: invoked from within
[01:38:12] [Beholder]: Tcl: "anti:lamer $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5"
--> i changed $bnick to $nick and it bans now, so no more bnick error

i want to point out that it doesnt give the correct banmsg:
[02:19:48] [Hola]: psdojfspoj fsdfpjo sdsqdsqd qsd
[02:19:49] ::: Kick: (Hola) was kicked by (Beholder) (Excessive use of Colors is not allowed here (Warning -> Kick))
[02:19:49] ::: Join: (Hola) (God@StaticBox-A48595E7.access.telenet.be)
[02:20:10] [Hola]: ________________________
[02:20:11] ::: Mode: (Beholder) sets (+b *!*God@StaticBox-A48595E7.access.telenet.be)
[02:20:11] ::: This (*!*God@StaticBox-A48595E7.access.telenet.be) ban affects (Hola)
[02:20:11] ::: Kick: (Hola) was kicked by (Beholder) (Banned: 10min - Excessive use of Colors is not allowed here)
his 1st msg was in colors, his second was ___ abuse. why does it say: colors in the banmsg?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Darth_Unslut wrote:li have a small question: how would you translate "Hervorhebungen"?
haha, sorry, I forgot that the shortcut "hl" might not neccesarrily lead to "highlight" :D.
[01:38:11] [Beholder]: Tcl: can't read "bnick": no such variable
[01:38:11] [Beholder]: Tcl: while executing
[01:38:12] [Beholder]: Tcl: "getchanhost $bnick $chan"
[01:38:12] [Beholder]: Tcl: (procedure "anti:lamer" line 85)
[01:38:12] [Beholder]: Tcl: invoked from within
[01:38:12] [Beholder]: Tcl: "anti:lamer $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5"

--> i changed $bnick to $nick and it bans now, so no more bnick error
what a stupid mistake, while writing a piece a code for another here I must have copied that thing with "bnick" instead of "nick" as varname accidently, lol, what a stupid mistak :D.

I will update the download later, meanwhile perhaps its easier so search and replace all "bnick" to "nick" like Darth_Unslut did ^^.
Darth_Unslut wrote:this happened when doing !! ?? .. or __ abuse

i want to point out that it doesnt give the correct banmsg:
[02:19:48] [Hola]: psdojfspoj fsdfpjo sdsqdsqd qsd
[02:19:49] ::: Kick: (Hola) was kicked by (Beholder) (Excessive use of Colors is not allowed here (Warning -> Kick))
[02:19:49] ::: Join: (Hola) (God@StaticBox-A48595E7.access.telenet.be)
[02:20:10] [Hola]: ________________________
[02:20:11] ::: Mode: (Beholder) sets (+b *!*God@StaticBox-A48595E7.access.telenet.be)
[02:20:11] ::: This (*!*God@StaticBox-A48595E7.access.telenet.be) ban affects (Hola)
[02:20:11] ::: Kick: (Hola) was kicked by (Beholder) (Banned: 10min - Excessive use of Colors is not allowed here)
his 1st msg was in colors, his second was ___ abuse. why does it say: colors in the banmsg?
Maybe you set a small value for kick. If you are using 0.1.3 and not 0.1.2 which had a stupid bug in the lsort expression it might be that the color abuse was quite more high. if you set color very low the points count very fast. I was thinking about changing it, but I am not sure. Actually, when you say 5 colors are bad, than 20 colors are already 4th that bad, because the increase is currently round(amount / maxvalue) ^-^.
I removed it in the others, because you would have to use at least 41% to prevent the to count a 3 on 100% :D.
So simply said, the color dominated -> color is the main reason for kicking ^^. dominating is considered if highest ranking abuse has a counter of -1 of kick or more
set liste [lsort -integer -decreasing -index 0 $liste]
if { $total == [lindex [lindex $liste 0] 0] || [lindex [lindex $liste 0] 0] > [expr $antilamer(kick) - 1] }
the list should look like this now:
{3 color} {1 marks}
here it is decited if it takes a specific reason or if it takes the default one.
Probably this way isnt very accurate for a kick value below 4 ^-^.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
dotslasher
Halfop
Posts: 62
Joined: Sun Aug 10, 2003 8:10 pm

Post by dotslasher »

i see. k
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

v0.1.5 released

Changes:
  • the way "multiple flooding" in one line was counted has been. I added now a divisor (which should never be set to 0 :P) to lower everything above the 1 times
    ex.: so if you set maxcolors to 10 and someone wrote 40 chars in color, he got a counter of 4 and got kicked immediatly (with default values). now 4 times will be recuded to 2.5 times (and rounded real)

    best shown with the actuall code:
    expr round(1 + ($rounded - 1) / $::antilamer(multidivisor))
  • CAPs counting has been changed a bit, so beware. Too low settings might kick users pretty fast. now the caps count is not divided by the string length, but by the count of (ASCII) letters. so screaming like "WTF !?!?!" will be 100% caps and probably trigger marks as well and he will gain 2 flood counts ^-^. the detecting is saved in $re(al6), feel free to change it, but setting something wrong could cause the bot to count every line as 1 char and kick everyone using single caps :D.
  • some default settings have been changed, also note to not delete the new setting (at the very bottom of the settings) while importing your old ones
I tried to test the time consumsion of the script, however on the shell I was testing it, it was simply to fast, each iteration took less than 1ms :D. So im pretty confident the regular expression caching is working. I will test it on a slower shell as soon as this was one gets identd back :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Seems I did it again. I updated a script and was too lazy/unconfident to release it :D. So here we go:

New version is 0.1.8 and that are the changes:
- always warn on first abuse now
- removed missplaced join, added more comments for config
- fixed a copy&paste error which caused a var abuse not found error
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Z
Zeniitti
Voice
Posts: 5
Joined: Sun Apr 23, 2006 1:28 pm

Post by Zeniitti »

0.1.8 and this bumb to this:

Channel:

Code: Select all

[20:34] [XS4-3622] :DDDDDDDDDDDDDDDDDDDDDDDDDDDD
Bot:

Code: Select all

[20:35] <Rehtoori> [20:36] Tcl error [btext:line]: can't read "o": no such variable
[20:35] <Rehtoori> [20:36] Tcl error [repeat:kick]: can't read "o": no such variable
[20:35] <Rehtoori> [20:36] Tcl error [caps:kick]: can't read "p": no such variable
[20:35] <Rehtoori> [20:36] Tcl error [text:char]: can't read "o": no such variable
[20:35] <Rehtoori> [20:36] Tcl error [text:line]: can't read "o": no such variable
Channel:

Code: Select all

[20:37] [XS4-3622] dÏ mDå¥‼Ëi╦§1å╦╠♂·~╬å╦¶╔v╚╔┼u
Bot:

Code: Select all

[20:37] <Rehtoori> [20:38] Tcl error [btext:chars]: can't read "o": no such variable
[20:37] <Rehtoori> [20:38] Tcl error [btext:line]: can't read "o": no such variable
[20:37] <Rehtoori> [20:38] Tcl error [repeat:kick]: can't read "o": no such variable
[20:37] <Rehtoori> [20:38] Tcl error [caps:kick]: can't read "p": no such variable
[20:37] <Rehtoori> [20:38] Tcl error [text:char]: can't read "o": no such variable
[20:37] <Rehtoori> [20:38] Tcl error [text:line]: can't read "o": no such variable
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

That's not an error from De Kus' antilamer. It's from allprotection4.5, you need to .restart your bot or .ap:reset <everychannel>. This issue will be fixed in 4.6 (hopefully will be released soon).
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

but this a mysterious coincidence, because I came back here tonight to release a fix for a "no such var" error message... but the error which occured here was:

Code: Select all

can't read "new": no such variable
    while executing
"if {$antilamer(warn) && $total == [expr $antilamer(kick) - 1] || ($total > $antilamer(kick) && $new) && [botisop $chan]} {
   puthelp "NOTICE $nick :$..."
    (procedure "anti:lamer" line 90)
which has been fixed with the new 0.1.9 release of course :).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Z
Zeniitti
Voice
Posts: 5
Joined: Sun Apr 23, 2006 1:28 pm

Post by Zeniitti »

Ok, I fully restrartted eggdrop and try antilamer script. I'll post results here.
Z
Zeniitti
Voice
Posts: 5
Joined: Sun Apr 23, 2006 1:28 pm

Post by Zeniitti »

Seems to be working nicely 8)
s
silverboy
Halfop
Posts: 55
Joined: Sat Feb 11, 2006 5:44 am
Contact:

Post by silverboy »

Great script but How do i remove CAPS/SCREAMING KICKS From the script?.. i dont need those for my channel. :)
proxyz..proxyz...i see everywher... O_o
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I haven't integrated such a function natively, but setting 'antilamer(maxcaps)' above 1.0 should effitively disable the feature, because there cannot by logic be more than 100% CAPS ^-^.

PS: sorry for late answer, I read the email at work and forgot to check it at home ^-^.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Post Reply