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 a good flood protection script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
n
nytram
Voice
Posts: 8
Joined: Fri Sep 23, 2005 5:56 pm

Looking for a good flood protection script

Post by nytram »

My channel regularly gets flooded (as shown below) and besides being annoying has the tendency to bring my bot down or lag it badly

Can anyone advise on a script that will prevent this? Ive done a search but got many results and some helpful advice from someone here will save me a lot of time and be much appreciated

Just a script that will stop the flood problem and which is simple to setup and use

Thanks,

---------------------------------------------------------------------------------
* g248561k (~rkvegtft@201.39.40.133) has joined #relaxx
* p212772f (~ljnssso@68.57.199.127) has joined #relaxx
* z667745y (~ihgbkoob@64.13.89.226) has joined #relaxx
* w641643n (~djgjmbux@64.13.89.226) has joined #relaxx
* c278768l (~llhfclxa@211.20.130.242) has joined #relaxx
* l524876x (~ngrrywyh@143.248.34.185) has joined #relaxx
-g248561k/#relaxx- Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-
* p212772f (~ljnssso@68.57.199.127) has left #relaxx ( Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-)
* z667745y (~ihgbkoob@64.13.89.226) has left #relaxx ( Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

# Lock if x drones join in y secs
set ldrones(o:s) 3:5

bind join - * lock:drones

proc lock:drones {nick uhost hand chan} {
 global ldrones lockedchan
 if {![regexp {^[a-z][0-9]{6}[a-z]$} $nick]} {return 0}
 if {![info exists lockedchan([set chan [string tolower $chan]])]} {
  set lockedchan($chan) 0
 }
 if {![info exists ldrones($chan)]} {
  set ldrones($chan) [list 0 [unixtime]]
 }
 foreach {o s} $ldrones($chan) {of se} $ldrones(o:s) {break}
 if {[unixtime]-$s >= $se} {
  set ldrones($chan) [list [set o 0] [unixtime]]
 }
 if {[incr o] >= $of && !$lockedchan($chan)} {
  putquick "mode $chan +mR"
  set lockedchan($chan) 1
  set ldrones($chan) [list 0 [unixtime]]
  timer 1 [list unlockchan $chan]
  return 0
 }
 set ldrones($chan) [list $o [unixtime]]
}

proc unlockchan chan {
 global lockedchan
 foreach m {m R} {
  pushmode $chan -$m
 }
 set lockedchan($chan) 0
}
Last edited by Sir_Fz on Wed May 09, 2007 3:04 pm, edited 4 times in total.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Tcl Archive

Search

Literally tonnes of such scripts; go and test and work out which suites your needs.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
n
nytram
Voice
Posts: 8
Joined: Fri Sep 23, 2005 5:56 pm

Post by nytram »

Thanks Sir_Fz I'm giving the script a try now
h
honeybee
Halfop
Posts: 80
Joined: Sun Jan 01, 2006 12:42 pm

Post by honeybee »

Sir_Fz wrote:

Code: Select all

# Lock if x drones join in y secs
set ldrones(o:s) 3:5

bind join - * lock:drones

proc lock:drones {nick uhost hand chan} {
 global ldrones
 if {![regexp {^[a-z][0-9]{6}[a-z]$} $nick]} {return 0}
 if {![info exists ldrones([set chan [string tolower $chan]])]} {
  set ldrones($chan) [list 0 [unixtime]]
 }
 foreach {o s} $ldrones($chan) {of se} $ldrones(o:s) {break}
 if {[unixtime]-$s >= $se} {
  set ldrones($chan) [list [set o 0] [unixtime]]
 }
 if {[incr o] >= $of} {
  putquick "mode $chan +mR"
  set ldrones($chan) [list 0 [unixtime]]
  return 0
 }
 set ldrones($chan) [list $o [unixtime]]
}
it locks the chan, what about unlocking it?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

That'll need just a little bit of work from you ;)
h
honeybee
Halfop
Posts: 80
Joined: Sun Jan 01, 2006 12:42 pm

Post by honeybee »

Code: Select all

# Lock if x drones join in y secs
set ldrones(o:s) 3:5

bind join - * lock:drones

proc lock:drones {nick uhost hand chan} {
 global ldrones
 if {![regexp {^[a-z][0-9]{6}[a-z]$} $nick]} {return 0}
 if {![info exists ldrones([set chan [string tolower $chan]])]} {
  set ldrones($chan) [list 0 [unixtime]]
 }
 foreach {o s} $ldrones($chan) {of se} $ldrones(o:s) {break}
 if {[unixtime]-$s >= $se} {
  set ldrones($chan) [list [set o 0] [unixtime]]
 }
 if {[incr o] >= $of} {
  putquick "mode $chan +mR"
  set ldrones($chan) [list 0 [unixtime]]
  return 0
 }
 set ldrones($chan) [list $o [unixtime]]
 timer 1 [list putquick "mode $chan -mR"] 
}
it should do the job
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Ok, that is good but it will run the timer even if a lock didn't take place. I've edited my code above to solve this problem and also eliminate multiple locking.
g
gabop
Voice
Posts: 1
Joined: Sun Apr 27, 2008 5:08 am
Location: Santa Fe

Post by gabop »

I see a user who does that [censored] on me, how do I stop from reading it ?
[Miércoles 13 Octubre 2010] [03:40:33] |Aviso| -DIOS-CV- 0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-
[Miércoles 13 Octubre 2010] [03:40:33] |Aviso| -DIOS-lZ- 0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-
[Miércoles 13 Octubre 2010] [03:40:33] |Aviso| -DIOS-Am- 0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-
[Miércoles 13 Octubre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