| View previous topic :: View next topic |
| Author |
Message |
nytram Voice
Joined: 23 Sep 2005 Posts: 8
|
Posted: Tue Apr 10, 2007 10:03 am Post subject: Looking for a good flood protection script |
|
|
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Apr 10, 2007 7:15 pm Post subject: |
|
|
| 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 |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Apr 10, 2007 7:17 pm Post subject: |
|
|
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 |
|
 |
nytram Voice
Joined: 23 Sep 2005 Posts: 8
|
Posted: Mon Apr 16, 2007 12:42 pm Post subject: |
|
|
| Thanks Sir_Fz I'm giving the script a try now |
|
| Back to top |
|
 |
honeybee Halfop
Joined: 01 Jan 2006 Posts: 80
|
Posted: Tue May 08, 2007 7:37 pm Post subject: |
|
|
| 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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue May 08, 2007 7:47 pm Post subject: |
|
|
That'll need just a little bit of work from you  _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
honeybee Halfop
Joined: 01 Jan 2006 Posts: 80
|
Posted: Wed May 09, 2007 2:20 pm Post subject: |
|
|
| 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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed May 09, 2007 3:00 pm Post subject: |
|
|
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 |
|
 |
gabop Voice
Joined: 27 Apr 2008 Posts: 1 Location: Santa Fe
|
Posted: Wed Oct 13, 2010 2:44 am Post subject: |
|
|
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`'.`.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