egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

antilamer - control code, caps, etc. control

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon Apr 18, 2005 2:11 pm    Post subject: antilamer - control code, caps, etc. control Reply with quote

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
_________________
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...


Last edited by De Kus on Wed Jun 20, 2007 12:37 pm; edited 4 times in total
Back to top
View user's profile Send private message MSN Messenger
dotslasher
Halfop


Joined: 10 Aug 2003
Posts: 62

PostPosted: Mon Apr 18, 2005 6:56 pm    Post subject: Reply with quote

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

i have a small question: how would you translate "Hervorhebungen"?
Back to top
View user's profile Send private message
dotslasher
Halfop


Joined: 10 Aug 2003
Posts: 62

PostPosted: Mon Apr 18, 2005 7:35 pm    Post subject: Reply with quote

this happened when doing !! ?? .. or __ abuse

Quote:
[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:

Quote:
[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?
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Tue Apr 19, 2005 1:13 am    Post subject: Reply with quote

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" Very Happy.

Quote:
[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 Very Happy.

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:

Quote:
[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% Very Happy.
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
Quote:
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:
Quote:
{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...
Back to top
View user's profile Send private message MSN Messenger
dotslasher
Halfop


Joined: 10 Aug 2003
Posts: 62

PostPosted: Tue Apr 19, 2005 7:10 pm    Post subject: Reply with quote

i see. k
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu Jun 16, 2005 8:45 am    Post subject: Reply with quote

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 Razz) 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 Very Happy.
  • 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 Very Happy. 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 Very Happy.
_________________
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...
Back to top
View user's profile Send private message MSN Messenger
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Feb 25, 2006 8:56 am    Post subject: Reply with quote

Seems I did it again. I updated a script and was too lazy/unconfident to release it Very Happy. 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...
Back to top
View user's profile Send private message MSN Messenger
Zeniitti
Voice


Joined: 23 Apr 2006
Posts: 5

PostPosted: Mon Apr 24, 2006 1:24 pm    Post subject: Reply with quote

0.1.8 and this bumb to this:

Channel:
Code:
[20:34] [XS4-3622] :DDDDDDDDDDDDDDDDDDDDDDDDDDDD


Bot:
Code:
[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:
[20:37] [XS4-3622] dÏ mDå¥‼Ëi╦§1å╦ ♂·~╬å╦¶╔v╚╔┼u


Bot:
Code:
[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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Apr 24, 2006 4:28 pm    Post subject: Reply with quote

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).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon Apr 24, 2006 5:46 pm    Post subject: Reply with quote

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:
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 Smile.
_________________
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...
Back to top
View user's profile Send private message MSN Messenger
Zeniitti
Voice


Joined: 23 Apr 2006
Posts: 5

PostPosted: Tue Apr 25, 2006 11:37 am    Post subject: Reply with quote

Ok, I fully restrartted eggdrop and try antilamer script. I'll post results here.
Back to top
View user's profile Send private message
Zeniitti
Voice


Joined: 23 Apr 2006
Posts: 5

PostPosted: Tue Apr 25, 2006 12:16 pm    Post subject: Reply with quote

Seems to be working nicely Cool
Back to top
View user's profile Send private message
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Tue Jun 12, 2007 6:16 am    Post subject: Reply with quote

Great script but How do i remove CAPS/SCREAMING KICKS From the script?.. i dont need those for my channel. Smile
_________________
proxyz..proxyz...i see everywher... O_o
Back to top
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 20, 2007 12:33 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber