|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
Hi, I was wondering if it is possible to make a script that will set +m on the channel if flooding is detected and then make a warning text saying something like: +m activated due to flood. And then the +m would automaticly be removed after 5 seconds.
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
[/code] on @*:JOIN:#channel:{ inc -u5 $+(%,joinflood.,$chan) if ($($+(%,joinflood.,$chan),2) > 5) { mode $chan +m msg $chan Set +m due to join flood .timer. $+ $chan 1 5 mode $chan -m } } [/code]
(Code untested)
Name of your channel
More than this many users must join ... with less than this many seconds between them to trigger protection
Protection is removed after this many seconds
-genius_at_work
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
I think he means text flood, not join flood.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
Sorry yes, I meant textflood, forgot to mention that.
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
I guess that would make more sense with +m .......
on @*:TEXT:*:[color:red]#channel,#another[/color]:{
hinc -mu[color:blue]5[/color] $+(flood.,$chan) $+(text.,$nick) 1
hinc -u[color:brown]5[/color] $+(flood.,$chan) text.~ 1
if ($hget($+(flood.,$chan),$+(text.,$nick)) > [color:green]10[/color]) ban -ku[color:pink]60[/color] $chan $nick 2 Flooding is not allowed here
if ($hget($+(flood.,$chan),text.~) > [color:orange]25[/color]) {
mode $chan +m
msg $chan Set +m due to flood
.timer 1 [color:purple]5[/color] mode $chan -m
}
}
(untested) If a single user floods, they will be kickbanned for ( 60) seconds. If many users flood, the channel will be set +m for ( 5) seconds. Channel name(s)Any single user must say this many lines of text ... with less than this many seconds between any two lines to trigger protection. The combination of lines from all users must be more than this ... with less than this many seconds between any two lines to trigger protection. Script will wait this many seconds before unbanning a single flooderScript will wait this many seconds before setting -m for multiple flooders-genius_at_work
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
Thanks alot, I just tested it, and it works perfectly, but how can I make it so that OPs wont be affected by the script?
And I would like a version wich not has the kick/ban included, I tried removing that part from the script, but then it sets +m even if you only type one letter.
Last edited by starpossen; 16/02/06 06:32 AM.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
on @*:TEXT:*:#channel,#another:{
[color:red]if ($nick isop $chan) return[/color]
hinc -mu5 $+(flood.,$chan) $+(text.,$nick) 1
hinc -u5 $+(flood.,$chan) text.~ 1
if ($hget($+(flood.,$chan),$+(text.,$nick)) > 10) ban -ku60 $chan $nick 2 Flooding is not allowed here
if ($hget($+(flood.,$chan),text.~) > 25) {
mode $chan +m
msg $chan Set +m due to flood
.timer 1 5 mode $chan -m
}
}
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
on @*:TEXT:*:#channel,#another:{
if ($nick isop $chan) return
inc -u5 $+(%,flood.,$chan) 1
if ($($+(%,flood.,$chan),2) > 25) {
mode $chan +m
msg $chan Set +m due to flood
.timer 1 5 mode $chan -m
}
}
-genius_at_work
|
|
|
|
|