To use this module you should add the following tag to your Configuration file:
<include file="filter.conf">
You should then create a filter.conf file, which contains filter entries. The filter.conf is a standard styled config file, containing tags formatted like the one below:
<keyword pattern="^querty$" reason="You qwertied!" action="gline" flags="pn" duration="1h6s">
The patterns used are perl compatible Regular Expressions which match against any PRIVMSG, PART, QUIT or NOTICE command.
The action variable can be one of three values:
- kill - Disconnects the user if they match the pattern, giving the value of 'reason' as the quit reason. When the 'kill' type is matched in a QUIT message, this acts identically to 'block', as there is little point in sending a KILL for a user who is quitting anyway.
- block - Blocks the whole line and informs all opers with +s that the line was blocked, and who sent it, along with the reason text. In the case of PART and QUIT messages, a reason matching a block is replaced with 'Reason filtered', as it is not possible to block the whole line without desynching clients.
- none - Do nothing except log the match. This is the default if the action variable is omitted from the tag.
- gline - Set a gline on the user's IP address, lasting for 'duration' minutes, or permenant if the duration is omitted from the tag.
- silent - This blocks the line only, and informs the user their message was blocked, but does not notify opers.
See below for a definition of the flags which can be used in the flags field.
NOTE: From 1.1 b5 onwards, you don't have to seperate out your filter definitions into a seperate file like this, although it keeps things tidy and is still recommended.
|