Flood control

From SwiftIRC Wiki
Jump to: navigation, search


How to find out who is flooding/spamming

No matter who it is, spamming either YOU or a CHANNEL you’re in, you’d always want to know who the spammer is, and how to take action.

 /whois SwiftUSer
 SwiftUSer is ~User@Swift-D1FF2A60.swiftexample.com * User of SwiftIRC
 SwiftUSer on #SwiftChannel
 SwiftUSer using *.SwiftIRC.net SwiftIRC network
 SwiftUSer has identified for this nick
 SwiftUSer is using a Secure Connection
 SwiftUSer is filtering messages
 SwiftUSer has been idle 1min 4secs, signed on Thu Feb 25 08:11:41
 SwiftUSer End of /WHOIS list.

So, you’ve obtained some very useful information of the spammer. Now, we can utilise this information to help you deal with these spammers.

The first line of a /whois reply, is THE MOST IMPORTANT line of the whois. It gives the nickname, ident, host and realname of the user. This will help you ban, ignore, or silence them, covered a bit later.

The second line tells you what channels they are in. If you already know what channels they are in, this line isn’t really needed.

The fourth line shows you if they are identified to NickServ or not. This is very helpful in determining how you can block them out of your private messages and channels. This line determines whether you need to use channel modes +M or +R, and user modes +R.

The fifth line usually isn’t needed, but if your entire channel is using secure connections (which is very unlikely), and the spammer is not, you can block them out. This line determines whether you need to use channel mode +z.

In the event that the spammer is changing their nick frequently, making it difficult to obtain a host for the user, some clients allow you to use:

 /whowas SwiftUser

This will display information about whoever was last using the nickname, provided it is within a certain time window.

Channel floods


(Please note: this section assumes you are either the founder or have identified to the channel using the channel password.)

BotServ pseudoclients (or simply bots) have the ability to kick spammers who use a variety of techniques to spam you. Please see the BotServ kick section of the wiki for more information on this function.

Channel mode +f

(Please note this section assumes you have OP (+o/@) access in the channel in question.)

+f is a very comprehensive mode which allows for full control of how floods are dealt with. The syntax is as follows:

 /mode #chan +f [<amount><type>{#<action>}{,...}]:<seconds>
-----Type-----Name--------Default Action---Other Actions-----
       c        CTCP        +C               m, M
       j        Join        +i               R
       k        Knock       +K
       m        Messages    +m               M
       n        Nickchange  +N
       t        Text        kick             b

What does that all mean?

So, +f works by informing the IRCd what action you want it to take and how it should act when your channel is flooded or attacked.

So, if you wanted a spammer to be kicked for spamming MORE than 5 lines in 3 seconds, you would type:

 /mode #channel +f [5t]:3

This tells UnrealIRCd (SwiftIRC’s IRC software) to count how many lines a person has said (in this case, 5) and match it to a timer which counts how many seconds have elapsed (3). If this is matched, and the user says a 6th line in the time frame, the user would be kicked. Here’s some examples.

 /mode #channel +f [5t#b]:3
 Bans the user after 5 lines in 3 seconds.
 /mode #channel +f [1k]:3
 Prevents knocking without removing +K.
 /mode #channel +f [20m#M]:4
 Limits talking to registered users after 20 lines from anyone
 (m tallies per channel, t tallies per user).
 /mode #channel +f [3n#N5]:10
 Sets +N for 5 minutes when 3 nickchanges occur in 10 seconds.
 /mode #channel +f [1c#C5,3j#R2]:8
 Sets +C for 5 minutes when 1 CTCP happens in 8 seconds, and sets +R for 2 minutes when 3 joins happen in 8 seconds. 

Please note you cannot put a time limit on banning on text flood. You cannot set any other mode using the flood protection mode apart from the ones listed above in the code box.

Useful channel modes

Channel modes are always set by:

/mode #channel +/-<mode> <parameters (if any)>.
  • +C – Disallows CTCPs for anyone who does not have op. Requires op to set.
  • +E – Disallows the use of ACTIONS (/me) in the channel for anyone who does not have op. Requires op to set.
  • +B – Blocks multi-target messages (AMSGs) from being displayed in the channel. Requires op to set.
  • +G – This mode filters bad words specified by SwiftIRC staff. You cannot change the words filtered by this mode. Requires op to set.
  • +i – Sets the channel to be invite-only. Requires halfop to set.
  • +j – Sets the join flood limit. Unlike +f, it blocks joins for only the specified join flooder, and is counted PER USER. In the format +j JOINS:SECONDS. Requires op to set.
  • +k – Specifies a key (otherwise known as a password) when joining. In the format +k KEY. Requires halfops to set. Keys ARE CaSe SeNsItIvE.
  • +K – Prevents /KNOCKing, which sends notices to all ops in the channel. Requires op, and +i to be set in the channel.
  • +m – Allows only people with voice status or higher to speak. Requires halfops to set.
  • +M – Disallows non-registered users to speak, unless they have voice or higher status. Requires op to set.
  • +N – Disallows nickchanges by anyone who is not an op. Requires op to set.
  • +R – Disallows non-registered users to join. Requires ops to set.
  • +T – Disallows channel notices from people who are not ops. Requires op to set.
  • +V – Disallows anyone from using the /invite function. Requires op to set.
  • +z – Disallows anyone who isn’t using a secure connection from joining (BotServ bots can still join). Requires op to set.

For more information about Channel Modes, refer to this page.

Private-user floods


Someone’s spamming you for minutes on end, what do you do? Recall the first line of the WHOIS:

 SwiftUser is ~User@Swift-D1FF2A60.swiftexample.com * User of SwiftIRC

If your client has a built-in ignore function (mIRC, irssi, XChat, SwiftKit), then you can simply do

 /ignore NICK

Ignore blocks EVERYTHING sent from NICK. Most clients also support

/ignore *!*@HOST

Which is a much more effective way of ignoring, since NICK could just mean the spammer could nickchange and bypass the previous command. If you were to ignore SwiftUser in this case, you could use:

 /ignore *!*@Swift-D1FF2A60.swiftexample.com

Silence is also another method of ignore. Silence is done by the server for you, so all clients can take advantage of it. Silence doesn’t block channel messages/notices from the spammer, but it blocks private messages/notices from them. To use this feature, you can use:

 /silence +NICK

Note the + before the nick. This is essential, as it tells the IRCd whether you’re adding or removing an entry to the silence list.

Again, silencing the nick still is ineffective after he/she nickchanges, so you could also do this:

 /silence +*!*@HOST

If SwiftUser was the person spamming in this scenario you could use:

  /silence +*!*@Swift-D1FF2A60.swiftexample.com

To remove a silenced nickname or host type the same command but replace the + with a -

 /silence -*!*@Swift-D1FF2A60.swiftexample.com
 /silence -NICK

Some clients will allow you to view a list of entries on your silence list, using:


Please note that the list of entries on your silence list will be reset each time you disconnect from the server.

Useful user modes

User modes are always set by:

 /mode YOURNICK +/-<mode>
  • +d – Prevents you from receiving ALL private and channel MESSAGES. Services can override this mode, so you can still use services.
  • +f – Censors most internet links and changes them into asterisks. May be useful.
  • +G – Censors most swearwords and changes them into asterisks. May be useful.
  • +p – Hides the channels that you don’t share with your "whoiser". Can be very useful to prevent stalking.
  • +R – Only allows registered users to PM you.
  • +T – Prevents you from receiving CTCP Requests, regardless of source.

For more information about User Modes, refer to this page.

How to find a mode while on IRC

 /helpop ?chmodes – Lists channel modes
 /helpop ?umodes – Lists user modes
 /helpop ?chmodef – Help with channel mode +f

   This page has been expanded with the help of SwiftIRC user Darkex