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.

Flood protection script

Old posts that have not been replied to for several years.
Locked
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Flood protection script

Post by Nucleus »

Can someone pls explain to me what this script does?

Code: Select all

set flkick "Flood"
set fldura 600

bind flud - pub flchan
proc flchan {nick uhost hand type chan} {
	if {[isop $nick $chan] == "0"} {
		global flmask flkick fldura
		set flmask *!*@[lindex [split [getchanhost $nick $chan] "@"] 1]
		putserv "MODE $chan +b $flmask"
		putserv "KICK $chan $nick :$flkick" 
		utimer $fldura "putserv {MODE $chan -b $flmask}"
		return 1
	}
}

putlog "Flood"
I mean, i know it's a flood protection script, but what does it exactly do? What does it consider flooding? How many lines, how many seconds? Does it do a channel ban or does it put the ban in it's internal banlist?

I'm guessing the

Code: Select all

set fldura 600
is the ban duration in seconds? And the

Code: Select all

putserv "MODE $chan +b $flmask"
is a channel ban? Where's the lines/seconds value?

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

Post by De Kus »

this script is rather useless.
it will not consider anything as flooding, it just triggers when the bot considers something as flood (like msg flood, ctcp flood, deop flood etc.) and set a channel ban which is removed on a timed event.
So this script simply changes the default kick to a kickban ^-^.

PS: you were too slow FZ :P
Last edited by De Kus on Wed Apr 20, 2005 1:26 pm, edited 2 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
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This is a flud bind, which triggers on one of the built-in eggdrop flood protection (flood-chan, flood-nick, flood-kick...). This particular script triggers on a channel flood (single nick), and that depends on your flood-chan channel setting (.chanset #channel flood-chan msg:secs).

Tips: you can remove flmask from global, and use

Code: Select all

set flmask *!*@[lindex [split $uhost @] 1]
instead of

Code: Select all

set flmask *!*@[lindex [split [getchanhost $nick $chan] "@"] 1]
(that's redundant, why repeat the process :? )
and also replace

Code: Select all

utimer $fldura "putserv {MODE $chan -b $flmask}"
with

Code: Select all

utimer $fldura [list putserv "MODE $chan -b $flmask"]
fldura is the ban duration in seconds.

PS: lol De Kus, not the first time though :P
Locked