Advertisement
Guest User

tiff

a guest
Oct 3rd, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. 3.14 - Spamfilter
  2.  
  3. Spamfilter is a new system to fight spam, advertising, worms and other things. It works a bit like the badwords system but has several advantages.
  4.  
  5. Spamfilters are added via the /spamfilter command which uses the following syntax:
  6. /spamfilter [add|del|remove|+|-] [type] [action] [tkltime] [reason] [regex]
  7. [type] specifies the target type:
  8. Char: Config item: Description:
  9. c channel Channel message
  10. p private Private message (from user->user)
  11. n private-notice Private notice
  12. N channel-notice Channel notice
  13. P part Part reason
  14. q quit Quit reason
  15. d dcc DCC filename
  16. a away Away message
  17. t topic Setting a topic
  18. u user User ban, will be matched against nick!user@host:realname
  19. You can specify multiple targets, like: cpNn
  20. [action] specifies the action to be taken (only 1 action can be specified)
  21. kill kills the user
  22. tempshun shuns the current session of the user (if [s]he reconnects the shun is gone)
  23. shun puts a shun on the host
  24. kline puts a kline on the host
  25. gline puts a gline on the host
  26. zline puts a zline on the host
  27. gzline puts a gzline (global zline) on the host
  28. block block the message only
  29. dccblock mark the user so (s)he's unable to send any DCCs
  30. viruschan part all channels, join set::spamfilter::virus-help-channel, disables all commands except PONG, ADMIN, and msg/notices to set::spamfilter::virus-help-channel
  31. warn send a notice to IRCOps (spamfilter snomask), and inform the user that the message has been intercepted. No further action is taken, the message is not blocked.
  32. [tkltime] The duration of the *line/shun added by the filter, use '-' to use the default or to skip (eg: if action = 'block')
  33. [reason] Block/*line/shun reason.. you CANNOT use spaces in this, but underscores ('_') will be translated into spaces at runtime. And double underscore ('__') gets an underscore ('_'). Again, use '-' to use the default reason.
  34. [regex] this is the actual regex or 'bad word' where we should block on and perform the action at
  35.  
  36. Here's an example: /spamfilter add pc gline - - Come watch me on my webcam
  37. If the text come watch me on my webcam is found in either a private msg or a channel msg then the message will be blocked and a gline will be added immediately.
  38. Another example: /spamfilter add pc block - - come to irc\..+\..+
  39. This is a regex that will match on Hi, come to irc.blah.net etc....
  40. And an example with specified time/reason:
  41. /spamfilter add p gline 3h Please_go_to_www.viruscan.xx/nicepage/virus=blah Come watch me on my webcam
  42. If come watch me on my webcam is found in a private msg then the user is glined for 3 hours with the reason Please go to www.viruscan.xx/nicepage/virus=blah.
  43.  
  44. Spamfilters added with /spamfilter are network-wide. They work regardless of whether the user/channel has mode +G set, only opers and ulines (services) are exempted from filtering.
  45.  
  46. You can also add spamfilters in the config file but these will be local spamfilters (not network-wide, though you could use remote includes for this). The syntax of these spamfilter { } blocks are explained here
  47. Example:
  48. spamfilter {
  49. regex "//write \$decode\(.+\|.+load -rs";
  50. target { private; channel; };
  51. reason "Generic $decode exploit";
  52. action block;
  53. };
  54. set::spamfilter::ban-time allows you to modify the default ban time for *lines/shuns added by spamfilter (default: 1 day)
  55. set::spamfilter::ban-reason allows you to specify a default reason (default: 'Spam/advertising')
  56. set::spamfilter::virus-help-channel allows you to specify the channel to join for action 'viruschan' (default: #help)
  57. set::spamfilter::virus-help-channel-deny allows you to block any normal joins to virus-help-channel (default: no)
  58. Slow Spamfilter Detection
  59. A spamfilter regex can slow down the IRCd considerably. This really depends on the regex you use (and how the regex engine handles it), some are very fast and UnrealIRCd can execute thousands of them per second. Others can be extremely slow, take several seconds to execute, and could freeze the IRCd.
  60. To help against this, Unreal comes with Slow Spamfilter Detection: For each spamfilter, Unreal checks, each time it executes, how long it takes to execute. Once a certain threshold is reached the IRCd will warn or even remove the spamfilter.
  61. Warning is configured through set::spamfilter::slowdetect-warn (default: 250ms) and automatic deletion is configured by set::spamfilter::slowdetect-fatal (default: 500ms). You can set both settings to 0 (zero) to disable slow spamfilter detection.
  62. This feature is currently not available on Windows.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement