Spamfilter block

The spamfilter block allows you to add local spamfilters (not network-wide). See Features: Spamfilter for more information about spamfilters.

Syntax
spamfilter { match-type [simple|regex|posix]; match ; target {  }; action ; reason ; ban-time ; };

match-type is one of:
 * simple: simple matching supports only ? and * wildcards but is extremely fast.
 * regex: very advanced matching method that uses PCRE Regex. See Introduction to regex (PCRE).
 * posix: old 3.2.x regex engine using TRE Regex (Deprecated, for compatibility only)

match is the string to be matched. The syntax of the string depends on the match-type.

target specifies the targets, see here for a list of possible types (eg: 'channel').

action specifies the action to be taken, see here for a list of possible actions (eg: 'gline').

reason (optional): specifies the ban or block reason, else the default is used.

ban-time (optional): specifies the duration of a *line ban or shun, else the default is used (1 day).

Example
spamfilter { match-type simple; match "Come watch me on my webcam"; target { private; channel; }; action gline; reason "You are infected, please go to www.antivirus.xx/blah/virus=GrrTrojan"; ban-time 6h; };

spamfilter { match-type regex; match "come to irc\..+\..+"; target { private; channel; }; action gline; reason "No spamming allowed"; };

/* Same as previous but then 'simple' style */ spamfilter { match-type simple; match "come to irc.*.*"; target { private; channel; }; action gline; reason "No spamming allowed"; };

spamfilter { match-type regex; match "^\!portscan ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,5} [0-9]{1,5}"; target channel; reason "Attempting to use a GTBot"; action gline; };

For more examples check out spamfilter.conf in your UnrealIRCd.