IRC FAQ: Ajuda IRC Modos Usuario

Channel/Room modes

Channel Modes
Only Administrators may join
a <nick>
Makes the user a channel admin
b <nick!user@host>
Bans the given user from the channel
No ANSI color can be sent to the channel
No CTCP's allowed in the channel
e <nick!user@host>
Exception ban – If someone matches this, they can join a channel even if they match an existing ban
f [<number><type>]:<seconds>
Channel flood protection. See section 3.12 above for an extended description.
Makes channel G rated. Checks for words listed in the Badword Blocks, and replaces them with the words specified
h <nick>
Gives half-op status to the user
Invite required
I <nick!user@host>
Invite exceptions ("invex") - if someone matches this, they can bypass +i requirements to enter the channel.
j <joins:seconds>
Throttles joins per-user to joins per seconds seconds
/knock is not allowed
k <key>
Sets a key needed to join
l <##>
Sets max number of users
L <Chan>
If the amount set by +l has been reached, users will be sent to this channel
A registered nickname (+r) is required to talk
Moderated channel. Only +v/o/h users may speak
No nick name changes permitted
No messages from outside channels
Only IRCops may join
o <nick>
Gives a user channel operator status
Makes channel private
q <nick>
Sets channel owner
Only U:Lined servers can kick users
This channel is registered (only settable by services)
Requires a registered nickname to join
Strips all incoming colors
Makes channel secret
Only halfops, chanops, or better can set topic
No NOTICE's allowed in the channel
Auditorium – Makes /names and /who #channel only show channel ops
/invite is not allowed
v <nick>
Gives a voice to users. (May speak in +m channels)
Only clients on a Secure (SSL) Connection may join
Set by the server to indicate all users on the channel are on a Secure (SSL) Connection. Only active is +z is also set. ULines (eg: BotServ) are ignored when counting 'insecure users'. It's still up to the server admins to make safe server to server links (which could be with the help of SSL, but also VPN, loopback interface, quantum encryption, etc etc), the IRCd does not and cannot detect this.

Anti-Flood features


Throttling is a method that allows you to limit how fast a user can disconnect and then reconnect to your server. You can config it in your set::throttle block to allow X connections in YY seconds from the same IP.

Channel modes

There are also some 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, j = join throttling (per-user basis)
As of beta18 there's also a much more advanced channelmode +f...

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
cCTCPsauto +Cm, M 
jjoinsauto +iR 
kknocksauto +K (counted for local clients only)
mmessages/noticesauto +mM 
nnickchangesauto +N  
ttextkickbper-user messages/notices like the old +f. Will kick or ban the user.


*** ChanOp sets mode: +f [20j,50m,7n]:15 <ChanOp> lalala *** Evil1 ( has joined #test *** Evil2 (~jcvibhcih@Clk-3472A942.xx.someispcom) has joined #test *** Evil3 ( has joined #test *** Evil4 ( has joined #test -- snip XX lines -- *** Evil21 ( has joined #test *** Channel joinflood detected (limit is 20 per 15 seconds), putting +i *** sets mode: +i <Evil2> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl <Evil12> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl <Evil15> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl <Evil10> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl <Evil8> fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl -- snip XX lines -- *** Channel msg/noticeflood detected (limit is 50 per 15 seconds), putting +m *** 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 *** Channel nickflood detected (limit is 7 per 15 seconds), putting +N *** sets mode: +N

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..
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:

+f [30j#i10,40m#m10,7c#C15,10n#N15,30k#K10]:15

  • 30 joins per 15 seconds, if limit is reached set channel +i for 10 minutes
  • 40 messages per 15 seconds, if limit is reached set channel +m for 10 minutes
  • 7 ctcps per 15 seconds, if limit is reached set channel +C for 15 minutes
  • 10 nickchanges per 15 seconds, if limit is reached set channel +N for 15 minutes
  • 30 knocks per 15 seconds, if limit is reached set channel +K for 10 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.

Channel mode j

The +f mode includes a feature to prevent join floods, however this feature is "global." For example, if it is set to 5:10 and 5 different users join in 10 seconds, the flood protection is triggered. Channel mode +j is different. This mode works on a per-user basis. Rather than protecting against join floods, it is designed to protect against join-part floods (revolving door floods). The mode takes a parameter of the form X:Y where X is the number of joins and Y is the number of seconds. If a user exceeds this limit, he/she will be prevented from joining the channel.

Fonte: UnrealIRCd