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 

Looking for a good flood protection script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
nytram
Voice


Joined: 23 Sep 2005
Posts: 8

PostPosted: Tue Apr 10, 2007 10:03 am    Post subject: Looking for a good flood protection script Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Apr 10, 2007 7:15 pm    Post subject: Reply with quote

Code:
# 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
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts


Last edited by Sir_Fz on Wed May 09, 2007 3:04 pm; edited 4 times in total
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Apr 10, 2007 7:17 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
nytram
Voice


Joined: 23 Sep 2005
Posts: 8

PostPosted: Mon Apr 16, 2007 12:42 pm    Post subject: Reply with quote

Thanks Sir_Fz I'm giving the script a try now
Back to top
View user's profile Send private message
honeybee
Halfop


Joined: 01 Jan 2006
Posts: 80

PostPosted: Tue May 08, 2007 7:37 pm    Post subject: Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue May 08, 2007 7:47 pm    Post subject: Reply with quote

That'll need just a little bit of work from you Wink
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
honeybee
Halfop


Joined: 01 Jan 2006
Posts: 80

PostPosted: Wed May 09, 2007 2:20 pm    Post subject: Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed May 09, 2007 3:00 pm    Post subject: Reply with quote

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

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
gabop
Voice


Joined: 27 Apr 2008
Posts: 1
Location: Santa Fe

PostPosted: Wed Oct 13, 2010 2:44 am    Post subject: Reply with quote

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`(!)`Gr0u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h0N-T`(!)`gR0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0n-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''Jh0N-T`(!)`gRouP'.`.'eAsTeRn`(!)`ruLeZ`'.`.''Jh0N-T`(!)`Gr0uP`'.`.''EaStErN`(!)`RuLeZ`'.`.''JhoN-
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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