SpamServ

From OnlineGamesNetWiki
Jump to: navigation, search

Overview

SpamServ is a SRVX anti-Spam module, running in order to prevent channels from being flooded with text, joins, advertisements, and other kinds of spam.

Since August 2010, SpamServ on OnlineGamesNet was upgraded to the newest version which involves a more detailed setting routine for spam protection.
These routines allow channel owners / admins to specify unwanted text and actions in their channels and will be explained below.


SpamServ commands

  • REGISTER Register a new channel (available to network staff only).
  • UNREGISTER Remove SpamServ from a registered channel. (available to ChanServ channel owners and network staff only).
  • MOVE Move SpamServ to a different channel (available to network staff only).


  • SET Change various channel settings.
  • STATS Display the number of users who were punished by SpamServ.
  • ADDBADWORD Add a badword to the channel badword list.
  • DELBADWORD Delete a badword from the channel badword list.
  • LISTBADWORD List all entries in the channel badword list.
  • ADDEXCEPTION Add an exception to a badword's exception list.
  • DELEXCEPTION Delete an exception from a badword's exception list.
  • LISTEXCEPTION List all entries in a badword's exception list.

SpamServ scan types

The most important command for channel owners and admins is the set value, which allows to setup certain scans for SpamServ.

SpamServ scan types and their settings:

SpamScan:      Punishes users for sending the same message multiple times.
FloodScan:     Punishes users for flooding the channel with messages.
TimeframeScan: Punishes users for sending too many messages in a given timeframe.
JoinFloodScan: Punishes users for flooding the channel with join messages
ChanFloodScan: Punishes users for flooding a channel (mostly botnets).
BadwordScan:   Punishes users for sending badwords to a channel.
NoticeScan:    Punishes users for sending notices to a channel.
CapsScan:      Punishes users for using too many caps in messages.
DigitScan:     Punishes users for using too many digits in messages.


All scans can be enabled/disabled/configured separately.
To enable or disable a scan, enter /msg SpamServ SET <#channel> <scan> <on/off>.
To see all settings of a scan, enter /msg SpamServ SET <#channel> <scan>.
To change a scan setting, enter /msg SpamServ SET <#channel> <scan> <setting> <value>.


Every scan type may be configured with a specific reaction, e.g. 'spamming' does not have to be punished as harsh as the usage of badwords, join-flooding a chan not as harsh as using notices and so on.

The necessary command is:

  • /msg SpamServ SET <#channel> <scan> reaction [value]
  • Available values are:
    • 0 - Kick on violation.
    • 1 - Kickban on violation.
    • 2 - Timed ban on violation.
    • 3 - Kill on violation (available to IRC-Ops only).
    • 4 - G-Line on violation (available to IRC-Ops only).


All timed reactions (timed ban and G-line if configured) can be set up with a timeframe of its own. This allows a pretty detailed reaction scheme for every punishable action.

  • /msg SpamServ SET <#channel> <scan> duration [value]
  • Available values are:
    • 0 - Issue timed ban/G-Line for 5 minutes.
    • 1 - Issue timed ban/G-Line for 15 minutes.
    • 2 - Issue timed ban/G-Line for 30 minutes.
    • 3 - Issue timed ban/G-Line for 1 hour.
    • 4 - Issue timed ban/G-Line for 3 hours.
    • 5 - Issue timed ban/G-Line for 6 hours.
    • 6 - Issue timed ban/G-Line for 12 hours.
    • 7 - Issue timed ban/G-Line for 1 day.
    • 8 - Issue timed ban/G-Line for 1 week.



Having now configured the reaction and possible duration for these, we need to take a look at the single scan types.

SET SPAMSCAN

First one of the available scans, is the SpamScan, looking for repeated posting of the same message in a chan.

  • /msg SpamServ SET <#channel> spamscan [setting [value]]
    • SpamScan has different sub-settings available (besides the mentioned reaction and timeframe ones)
      • Trigger: Determines how many identical messages will be considered spam.
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • Warning: When enabled, users will get a warning before getting punished.
      • SkipColorCodes: When enabled, users cannot evade a punishment by adding color codes to the messages.
        IMPORTANT: If this setting is enabled SpamServ will not be able to recognize and punish arabic due to UTF-8 problems.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


Warning, SkipColorCodes, ScanChanOps and ScanVoiced are set with a binary – so it may be either 1 (activated) or 0 (de-activated). Reaction and Duration were explained above and the last setting Trigger allows specification of the punishable action like explained now:

  • /msg SpamServ SET <#channel> spamscan trigger [value]
  • Available values are:
    • 0 - User will be warned/punished after sending the same message twice.
    • 1 - User will be warned/punished after sending the same message 3 times.
    • 2 - User will be warned/punished after sending the same message 4 times.
    • 3 - User will be warned/punished after sending the same message 5 times.
    • 4 - User will be warned/punished after sending the same message 6 times.



Short tutorial on scan setup

We will now use this setting as explanation for the configuration of SpamScan.
Imagine you would want to set up spamscan in your channel #Spam, which shall react on the third posting of a message inside the chan with a warning and a timed ban for 15 minutes after that.

First of all we need to activate SpamScan (active by default though) with:

  • /msg SpamServ set #Spam spamscan 1


Next step is setting up the reaction (timed ban) and duration of this ban (15 minutes):

  • /msg SpamServ set #Spam spamscan reaction 2

and

  • /msg SpamServ set #Spam spamscan duration 1


Last step will be the trigger, in here we want to warn the third ! message of the same type posted, so we need to activate 'warning' and set the trigger to warning AFTER sending the same message 3 times (= warning after 3rd and punishment after 4th).

  • /msg SpamServ set #Spam spamscan warning 1

and

  • /msg SpamServ set #Spam spamscan trigger 1


Remember: with spamscan itself and warning the value is a binary one, so 1/0 represent active/not-active – with the other settings on the other hand, the 0/1 may represent a specific value. You should get a feedback by spamserv with an explanation on the used command though, to know for sure.

Having now explained one of the available scan types, we can continue with the other ones. Don't forget to activate the scan you are looking for at first or every setting will be useless.

SET FLOODSCAN

  • /msg SpamServ SET <#channel> floodscan [setting [value]]
    • When enabled, SpamServ checks if a user tries to flood the channel.
    • Posting several messages in a small amount of time is considered a 'flood'.
    • Available subsettings are:
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • Warning: When enabled, users will get a warning before getting punished.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


TIMEFRAMESCAN

  • /msg SpamServ SET <#channel> timeframescan [setting [value]]
    • When enabled, users are not allowed to send more than the allowed number of messages in a timeframe.
    • Available subsettings are:
      • Message: Determines how many messages a user may send.
      • Timeframe: Determines the timeframe.
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


Timeframescan requires (or better allows) some specification, to determine the number of messages and the timeframe in which they may be posted.

SET TIMEFRAMESCAN MESSAGE

  • /msg SpamServ SET <#channel> timeframescan message [value]
  • Available values are:
    • 0 - User will be punished after sending more than 1 message in the given timeframe.
    • 1 - User will be punished after sending more than 2 messages in the given timeframe.
    • 2 - User will be punished after sending more than 3 messages in the given timeframe.
    • 3 - User will be punished after sending more than 4 messages in the given timeframe.
    • 4 - User will be punished after sending more than 5 messages in the given timeframe.
    • 5 - User will be punished after sending more than 6 messages in the given timeframe.
    • 6 - User will be punished after sending more than 7 messages in the given timeframe.
    • 7 - User will be punished after sending more than 8 messages in the given timeframe.
    • 8 - User will be punished after sending more than 9 messages in the given timeframe.


SET TIMEFRAMESCAN TIMEFRAME

  • /msg SpamServ SET <#channel> timeframescan timeframe [value]
  • Available values are:
    • 0 - Only allow the given number of messages in 15 seconds.
    • 1 - Only allow the given number of messages in 30 seconds.
    • 2 - Only allow the given number of messages in 45 seconds.
    • 3 - Only allow the given number of messages in 60 seconds.
    • 4 - Only allow the given number of messages in 90 seconds.
    • 5 - Only allow the given number of messages in 2 minutes.
    • 6 - Only allow the given number of messages in 3 minutes.
    • 7 - Only allow the given number of messages in 4 minutes.
    • 8 - Only allow the given number of messages in 5 minutes.
    • 9 - Only allow the given number of messages in 10 minutes.
    • 10 - Only allow the given number of messages in 15 minutes.


SET JOINFLOODSCAN

  • /msg SpamServ SET <#channel> joinfloodscan [setting [value]]
    • When enabled, SpamServ checks if users rejoin the channel several times in a short timeframe.
    • Available subsettings are:
      • Trigger: Determines how many joins will be considered flooding.
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • Warning: When enabled, users will get a warning before getting punished.


JoinFloodScan allows a specification of the number of rejoins like follows:

SET JOINFLOODSCAN TRIGGER

  • /msg SpamServ SET <#channel> joinfloodscan trigger [value]
  • Available values are:
    • 0 - User will be warned/punished after rejoining twice.
    • 1 - User will be warned/punished after rejoining 3 times.
    • 2 - User will be warned/punished after rejoining 4 times.
    • 3 - User will be warned/punished after rejoining 5 times.


SET CHANFLOODSCAN

  • /msg SpamServ SET <#channel> chanfloodscan [setting [value]]
    • When enabled, SpamServ checks if the channel is getting attacked by several people (e.g. a botnet).
    • Available subsettings are:
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • ScanText: When enabled, all messages will be scanned for possible attacks.
      • ScanJoins: When enabled, all joins will be scanned for possible attacks.
      • ScanNickChanges: When enabled, all nick changes will be scanned for possible attacks.
      • SkipColorCodes: When enabled, users cannot evade a punishment by adding color codes to the messages.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


SET BADWORDSCAN

  • /msg SpamServ SET <#channel> badwordscan [setting [value]]
    • When enabled, SpamServ checks for badwords in channel messsages.
    • Available subsettings are:
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • SkipColorCodes: When enabled, users cannot evade a punishment by adding color codes to the messages.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


BadwordScan is one of the more difficult settings of SpamServ and is explained more detailed at the bottom of this article.

SET NOTICESCAN

  • /msg SpamServ SET <#channel> noticescan [setting [value]]
    • When enabled, SpamServ checks for notices sent to the channel. Enable this scan to disallow notices from being sent to the channel.
    • Available subsettings are:
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


SET CAPSSCAN

  • /msg SpamServ SET <#channel> capsscan [setting [value]]
    • When enabled, SpamServ punishes users who use too many capitalized characters in their message.
    • Available subsettings are:
      • Percent: Determines how many percent of a message may be capitalized.
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


With this scan type, you can punish the excessive usage of capitalized (big) letters inside a message. Normally, higher percentages are not used in normal text. Still, having capslock activated by mistake may result in a fast reaction (kick/ban/kill) by SpamServ here.

SET CAPSSCAN PERCENT

  • /msg SpamServ SET <#channel> capsscan percent [value]
    • 0 - Tolerate 10 percent capitalized letters in messages.
    • 1 - Tolerate 20 percent capitalized letters in messages.
    • 2 - Tolerate 30 percent capitalized letters in messages.
    • 3 - Tolerate 40 percent capitalized letters in messages.
    • 4 - Tolerate 50 percent capitalized letters in messages.
    • 5 - Tolerate 60 percent capitalized letters in messages.
    • 6 - Tolerate 70 percent capitalized letters in messages.
    • 7 - Tolerate 80 percent capitalized letters in messages.
    • 8 - Tolerate 90 percent capitalized letters in messages.


SET DIGITSCAN

  • /msg SpamServ SET <#channel> digitscan [setting [value]]
    • When enabled, SpamServ punishes users who use too many digits in their message.
    • Available subsettings are:
      • Percent: Determines how many percent of a message may be digits.
      • Reaction: Determines the punishment which will be used for users triggering the scan.
      • Duration: When 'Reaction' is set to 'Timed ban' or 'G-Line', the respective duration will be used. Otherwise, the setting will be ignored.
      • ScanChanOps: When enabled, messages from channel operators will be scanned as well.
      • ScanVoiced: When enabled, messages from voiced users will be scanned as well.


Similar to CapsScan, you can determine an allowed percentage of digits (= numbers) in posted message with this scan type. Be careful here, as small percentages are easily reached, e.g. when posting statistics or other 'digit-heavy' content from a game or website:

SET DIGITSCAN PERCENT

  • /msg SpamServ SET <#channel> digitscan percent [value]
    • 0 - Tolerate 10 percent digits in messages.
    • 1 - Tolerate 20 percent digits in messages.
    • 2 - Tolerate 30 percent digits in messages.
    • 3 - Tolerate 40 percent digits in messages.
    • 4 - Tolerate 50 percent digits in messages.
    • 5 - Tolerate 60 percent digits in messages.
    • 6 - Tolerate 70 percent digits in messages.
    • 7 - Tolerate 80 percent digits in messages.
    • 8 - Tolerate 90 percent digits in messages.



Usage of BadwordScan

BadwordScan is the option to punish the posting of specific text content inside your chan. It may result in unwanted kicks and bans though, if the badwords are not chosen carefully or entered with a rather big range of options by the usage of wildcards.

This explains as well, why BadwordScan is deactivated by default and may be activated with:

  • /msg SpamServ SET <#channel> badwordscan 1


To add (or delete) badwords and possible exceptions, several settings need to be made.

ADDBADWORD

  • /msg SpamServ ADDBADWORD <#channel> <badword> [reason]


Adds a badword to the badword list of the channel.
You can also enter a reason which will be displayed when punishing the user.

  • Examples:
    • /msg SpamServ ADDBADWORD #channel *badword* - SpamServ would punish on 'badword'
    • /msg SpamServ ADDBADWORD #channel *you?suck* - SpamServ would punish on 'you suck'
    • /msg SpamServ ADDBADWORD #channel *you*suck* - SpamServ would punish on 'you are dumb and suck'

The asterisk (*) substitutes as a wildcard character for zero or more characters and the question mark (?) substitutes as a wildcard character for any one character.
Make sure badwords are always surrounded by two asterisk (*) wildcards.
To disallow channel advertisements, you can add the badword *#?*.

DELBADWORD

  • /msg SpamServ DELBADWORD <#channel> <badword>


Deletes the badword from the badword list of the channel. All exceptions of the badword will be removed as well.

LISTBADWORD

  • /msg SpamServ LISTBADWORD <#channel>


Displays all entries in the badword list of the given channel.

ADDEXCEPTION

  • /msg SpamServ ADDEXCEPTION <#channel> <badword> <exception>


Adds an exception for a badword to the badword exception list.
While scanning for badwords, SpamServ checks if there is an exception matching as well. If so, the user will not be punished.

  • Examples:
    • Badword is *www.* and the exception is *onlinegamesnet*, users may post www.onlinegamesnet.net but may not post www.google.com.
    • Badword is *#?* and the exceptions are *onlinegamesnet* and *support*, users may post #onlinegamesnet and #support but may not post other channel names like #help.

Make sure exceptions are always surrounded by two asterisk (*) wildcards.

DELEXCEPTION

  • /msg SpamServ DELEXCEPTION <#channel> <badword> <exception>


Deletes an existing exception for a badword from badword exception list.

LISTEXCEPTION

  • /msg SpamServ LISTEXCEPTION <#channel> <badword>


Displays all entries in the exception list for the given badword.