mIRC Home    About    Download    Register    News    Help

Print Thread
#142145 16/02/06 04:53 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
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.

#142146 16/02/06 05:08 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
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

#142147 16/02/06 05:17 AM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
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!
#142148 16/02/06 05:43 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
Sorry yes, I meant textflood, forgot to mention that.

#142149 16/02/06 05:55 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I guess that would make more sense with +m .......

Code:
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 flooder

Script will wait this many seconds before setting -m for multiple flooders

-genius_at_work

#142150 16/02/06 06:29 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
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.
#142151 16/02/06 08:34 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
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
  }
}

#142152 16/02/06 05:44 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Code:
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


Link Copied to Clipboard