Module:Watch

From BNC4FREE
(Redirected from Module:watch)
Jump to navigation Jump to search

This module allows you to monitor the activity of specific users and/or text patterns and have the messages sent to a special custom query window. This can be useful for example if you would like a separate window for any messages containing your nickname.

Note: This module supports Expandable Strings

Usage

Arguments

This module takes no arguments

Commands

To add an entry into the watch list (See examples below), the following command can be used:

   /msg *watch add <hostmask> [target] [pattern]

To delete an entry from the watch list, the following command can be used:

   /msg *watch del <id>

To list all the entries currently in the watch list, use the following command:

   /msg *watch list

To show the commands needed to re-add all the entries to the watch list should it ever be needed, use the following command:

   /msg *watch dump

To clear all the entries from the watch list, use the following command:

   /msg *watch clear

To disable a specific watch entry, the following command can be used:

   /msg *watch disable <id>

To enable a specific watch entry that has previously been disabled, the following command can be used:

   /msg *watch enable <id>

To set the amount of buffer lines that the watch module will playback to your client when you connect, the following command can be used:

   /msg *watch buffer <amount>

Note: The maximum buffer that can be set is 1000 lines

To set whether a watch rule should continue to work while you are detached and replay messages back to you when your client connects, use the following command:

   /msg *watch setdetachedclientonly <id> <true/false>

To set whether a watch rule should continue to work while you are detached (not parted) from a channel, use the following command:

   /msg *watch setdetachedchannelonly <id> <true/false>

To set the channels that should be logged or specify channels not to log (See examples below), use the following command:

   /msg *watch setsources <id> <sources>

Examples

For the add command, the target is the name of the special query window you would like the messages to be logged to, hostmask is the hostmask of the user that you would like to monitor and pattern is the message pattern that you wish to be monitored.

An example showing how to log all messages from a user with the hostmask 'someuser@some.host.name' to a window named '*someuser-watch' is provided below:

   /msg *watch add *!someuser@some.host.name *someuser-watch *

Here is another example showing how to log messages from any user that contain your bouncers nickname to a window named '*nickalerts':

   /msg *watch add *!*@* *nickalerts *%nick%*

If for example, you wanted to ignore messages where your nickname is mentioned in particular channels, the following command can be used:

   /msg *watch setsources <id> * !#somechannel1 !#somechannel2

In this example '<id>' is the ID of the watch rule which can be obtained from the list command will change the rule so that messages from '#somechannel1' and '#somechannel2' aren't logged to the watch window but all other messages from other channels continue to be logged to the watch window.