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.

need help with an auto kickban script

Old posts that have not been replied to for several years.
Locked
s
sinistergentoo
Voice
Posts: 15
Joined: Fri Jul 08, 2005 11:43 pm

need help with an auto kickban script

Post by sinistergentoo »

i have been trying to find an auto kickban script for months now that will set a kickban if there are more than 4 requests made in 30 seconds. i know i need to learn TCL, but i REALLY have no time to learn it, or i would, so if there is anyone out there hwo knows/has one of these scripts, i would be greatly appreciative if you shared it. thanks
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

search the Tcl Archive for repeat
s
sinistergentoo
Voice
Posts: 15
Joined: Fri Jul 08, 2005 11:43 pm

Post by sinistergentoo »

i looked in there and havent found anything, unless im searching for the wrong thing. i tried auto kickban and just kickban with nothing like what i need. i hope im not just that stupid :)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

what kind of requests?
s
sinistergentoo
Voice
Posts: 15
Joined: Fri Jul 08, 2005 11:43 pm

Post by sinistergentoo »

its for my mp3 channel. i just want it to kickban them if there are more than 4 lines of

!nick blah.mp3

within 30 seconds of each other. so if there are 5 in 30 seconds, kickban them. fairly simple, i think, but i havent found anything for it

EDIT

still searching the tcl archive, but nothing yet
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

a quality anti-repeat script should do; I don't know if such scripts in the archive have any quality or/and the functionality you need, but you could at least try and see for yourself

if it turns out there's nothing suitable for you, let us know

P.S. by "quality anti-repeat" I mean a script that keeps track of identical lines said over a short period of time, not necessarily immediately one after another (again, I have no idea if such script exists, I normally don't use and/or review other people's botscripts)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

demond I don't think there is a repeat script that only checks for one-after-another repeats, most of these scripts check for the repeat in a certain period of time so I'm sure he can find a quality script :D sinistergentoo how about you try slennox's repeat script?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Sir_Fz wrote:demond I don't think there is a repeat script that only checks for one-after-another repeats, most of these scripts check for the repeat in a certain period of time so I'm sure he can find a quality script :D sinistergentoo how about you try slennox's repeat script?
now that you mentioned it, I bothered to download and take a look at repeat.tcl by slennox; indeed, it has the functionality I talked about, and I would have written it roughly the same way, with two notable exceptions - I'd store not the phrase itself but md5 hashed key of it (should save memory), also instead of utimers (you know I dislike utimers) I'd keep a timestamp (of course periodically cleaning up older records)

I'd imagine that's very good and useful anti-repeat script, certainly one that covers the needs of this thread's originator
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Yeah I use md5 in the repeat proc in allfloodprotection and I also strip control codes from the message (suggested by De Kus), but I use utimers :P although timestamps would be better as you said.
s
sinistergentoo
Voice
Posts: 15
Joined: Fri Jul 08, 2005 11:43 pm

Post by sinistergentoo »

i dl'ed a repeatkick script, which looks like it will work, if i only knew how to make it check for lines ending in .mp3 if someone knows how to edit it here is the link to the actual tar.gz i know its a bit much, but like previously said, i have NO idea what im doing editing tcl scripts. thanks again for all the help
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you want to allow repeating of anything but lines ending with .mp3?
s
sinistergentoo
Voice
Posts: 15
Joined: Fri Jul 08, 2005 11:43 pm

Post by sinistergentoo »

correct. in other words, if someone pastes 5 lines ending in .mp3 (example, !nick song.mp3) in less than 30 seconds, i want the script to kickban them for a specific amount of time. i dont know if that makes sense or not, just let me know
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well, to be frank, it doesn't make much sense to me to allow repeat flood of anything but one particular text mask; that being said, it is certainly possible to modify repeat.tcl in such way
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This should kick whoever repeats *.mp3 5 or more times in 30 or less seconds:

Code: Select all

bind pubm - *.mp3 mp3:repeat

proc mp3:repeat {nick uhost hand chan arg} {
 global mp3r
 if {![info exists mp3r($uhost:$chan)]} { set mp3r($uhost:$chan) 0 }
 incr mp3r($uhost:$chan)
 utimer 30 [list incr mp3r($uhost:$chan) -1]
 if {$mp3r($uhost:$chan) >= 5} {
  putkick $chan $nick "Do not repeat."
  pushmode $chan +b *!*@[lindex [split $uhost @] 1]
  timer 15 [list pushmode $chan -b *!*@[lindex [split $uhost @] 1]]
 }
}
s
sinistergentoo
Voice
Posts: 15
Joined: Fri Jul 08, 2005 11:43 pm

Post by sinistergentoo »

beautiful. thank you so much. so far, works perfectly. ill fine tune it when i get home from work today. thank again for all the help
Locked