How do I enable Flood Protection?
There are some new channel modes which can be very effective against floods. To name a few:
K = no /knock, N = no nickchanges, C = no CTCPs, M = only registered users can talk.
There's also a much more advanced channel mode +f...
Instead of using scripts and bots to protect against channel floods it is now build into the ircd.
An example +f mode is: *** Blah sets mode: +f [10j]:15
This means 10 joins per 15 seconds are allowed in the channel, if the limit is hit, the channel will be set +i automatically.
The following floodtypes are available:
| type: | name: | default action: | other avail. actions: | comments |
| c | CTCPs | auto +C | m, M | |
| j | joins | auto +i | R | |
| k | knocks | auto +K | | (counted for local clients only) |
| m | messages/notices | auto +m | M | |
| n | nickchanges | auto +N | | |
| t | text | kick | b | per-user messages/notices like the old +f. Will kick or ban the user. |
Example:
*** ChanOp sets mode: +f [20j,50m,7n]:15
<ChanOp> lalala
*** Evil1 (~fdsdsfddf@Clk-17B4D84B.blah.net) has joined #test
*** Evil2 (~jcvibhcih@Clk-3472A942.xx.someispcom) has joined #test
*** Evil3 (~toijhlihs@Clk-38D374A3.aol.com) has joined #test
*** Evil4 (~eihjifihi@Clk-5387B42F.dfdfd.blablalba.be) has joined #test
-- snip XX lines --
*** Evil21 (~jiovoihew@Clk-48D826C3.e.something.org) has joined #test
-server1.test.net:#test *** Channel joinflood detected (limit is 20 per 15 seconds), putting +i
*** server1.test.net sets mode: +i
<Evil2> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl
<Evil12> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl
<Evil15> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl
<Evil10> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl
<Evil8> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl
-- snip XX lines --
-server1.test.net:#test *** Channel msg/noticeflood detected (limit is 50 per 15 seconds), putting +m
*** server1.test.net sets mode: +m
*** Evil1 is now known as Hmmm1
*** Evil2 is now known as Hmmm2
*** Evil3 is now known as Hmmm3
*** Evil4 is now known as Hmmm4
*** Evil5 is now known as Hmmm5
*** Evil6 is now known as Hmmm6
*** Evil7 is now known as Hmmm7
*** Evil8 is now known as Hmmm8
-server1.test.net:#test *** Channel nickflood detected (limit is 7 per 15 seconds), putting +N
*** server1.test.net sets mode: +N
Advanced Flood Protection:
In fact, it can get even more advanced/complicated:
Instead of the default action, you can for some floodtypes specify another one, for example: +f [20j#R,50m#M]:15
This will set the channel +R if the joinlimit is reached (>20 joins in 15 seconds), and will set the channel +M if the msg limit is reached (>50 messages in 15 seconds).
There's also a "remove mode after X minutes" feature: +f [20j#R5]:15 will set the channel +R if the limit is reached and will set -R after 5 minutes.
A server can have a default unsettime (set::modef-default-unsettime), so if you type +f [20j]:15 it could get transformed into +f [20j#i10]:15, it's just a default, you can still set [20j#i2]:15 or something like that, and you can also disable the remove-chanmode completely by doing a +f [20j#i0]:15 (an explicit 0).
The old +f mode (msgflood per-user) is also still available as 't', +f 10:6 is now called +f [10t]:6 and +f *20:10 is now +f [20t#b]:10. Currently the ircd will automatically convert old +f mode types to new ones. Note that there's no unsettime feature available for 't' bans ([20t#b30]:15 does not work).
What the best +f mode is heavily depends on the channel... how many users does it have? do you have a game that makes users msg a lot (eg: trivia) or do users often use popups? is it some kind of mainchannel or in auto-join? etc..
Recommended Advanced Flood Protection Setting:
There's no perfect channelmode +f that is good for all channels, but to get you started have a look at the next example and modify it to suit your needs:
/mode #channel +f [10j#i10,30m#m10,2c#C15,10n#N15,2k#K15]:5
10 joins in five seconds, if limit is reached set channel +i (only invited users may join) for 10 minutes
30 lines in five seconds, if limit is reached set channel +m (only voiced and higher users can speak) for 10 minutes
2 ctcps in five seconds, if limit is reached set channel +C (no ctcps) for 15 minutes
10 nick changes in five seconds, if limit is reached set channel to +N (no nick changes) for 15 minutes
2 knocks in five seconds, if limit is reached set channel +K (no knocks) for 15 minutes
If it's some kind of large user channel (>75 users?) you will want to increase the join sensitivity (to eg: 50) and the message limit as well (to eg: 60 or 75).
Especially the remove-mode times are a matter of taste.. you should think like.. what if no op is available to handle the situation, do I want to have the channel locked for like 15 minutes (not nice for users) or 5 minutes (likely the flooders will just wait 5m and flood again). It also depends on the floodtype, users unable to join (+i) or speak (+m) is worse than having them unable to change their nick (+N) or send ctcps to the channel (+C) so you might want to use different removal times.
Posted in
FAQ
by #!/usr/bin/geek at 2004-11-13 16:49 ET (GMT-5)