Limnoria/plugins/MessageParser
Valentin Lorentz 63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
..
local Import MessageParser from gribble repo 2011-02-20 11:14:29 +01:00
locales Fix msgfmt warnings. 2020-03-26 22:10:28 +01:00
__init__.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
config.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
messages.pot PluginDownloader: update l10n-fi. 2014-03-22 16:38:16 +02:00
plugin.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
README.rst all plugins: regenerate READMEs 2021-04-22 00:29:15 +02:00
test.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00

Documentation for the MessageParser plugin for Supybot

Purpose

The MessageParser plugin allows you to set custom regexp triggers, which will trigger the bot to respond if they match anywhere in the message. This is useful for those cases when you want a bot response even when the bot was not explicitly addressed by name or prefix character.

An updated page of this plugin's documentation is located here: https://sourceforge.net/p/gribble/wiki/MessageParser_Plugin/

Usage

This plugin can set regexp triggers to activate the bot. Use 'add' command to add regexp trigger, 'remove' to remove.

Commands

add [<channel>|global] <regexp> <action>

Associates <regexp> with <action>. <channel> is only necessary if the message isn't sent on the channel itself. Action is echoed upon regexp match, with variables $1, $2, etc. being interpolated from the regexp match groups.

info [<channel>|global] [--id] <regexp>

Display information about <regexp> in the triggers database. <channel> is only necessary if the message isn't sent in the channel itself. If option --id specified, will retrieve by regexp id, not content.

list [<channel>|global]

Lists regexps present in the triggers database. <channel> is only necessary if the message isn't sent in the channel itself. Regexp ID listed in parentheses.

lock [<channel>|global] <regexp>

Locks the <regexp> so that it cannot be removed or overwritten to. <channel> is only necessary if the message isn't sent in the channel itself.

rank [<channel>|global]

Returns a list of top-ranked regexps, sorted by usage count (rank). The number of regexps returned is set by the rankListLength registry value. <channel> is only necessary if the message isn't sent in the channel itself.

remove [<channel>|global] [--id] <regexp>]

Removes the trigger for <regexp> from the triggers database. <channel> is only necessary if the message isn't sent in the channel itself. If option --id specified, will retrieve by regexp id, not content.

show [<channel>|global] [--id] <regexp>

Looks up the value of <regexp> in the triggers database. <channel> is only necessary if the message isn't sent in the channel itself. If option --id specified, will retrieve by regexp id, not content.

unlock [<channel>|global] <regexp>

Unlocks the entry associated with <regexp> so that it can be removed or overwritten. <channel> is only necessary if the message isn't sent in the channel itself.

vacuum [<channel>|global]

Vacuums the database for <channel>. See SQLite vacuum doc here: http://www.sqlite.org/lang_vacuum.html <channel> is only necessary if the message isn't sent in the channel itself. First check if user has the required capability specified in plugin config requireVacuumCapability.

Configuration

supybot.plugins.MessageParser.enable

This config variable defaults to "True", is network-specific, and is channel-specific.

Determines whether the message parser is enabled. If enabled, will trigger on regexps added to the regexp db.

supybot.plugins.MessageParser.enableForNotices

This config variable defaults to "False", is network-specific, and is channel-specific.

Determines whether the message parser is enabled for NOTICE messages too.

supybot.plugins.MessageParser.keepRankInfo

This config variable defaults to "True", is network-specific, and is channel-specific.

Determines whether we keep updating the usage count for each regexp, for popularity ranking.

supybot.plugins.MessageParser.listSeparator

This config variable defaults to ", ", is network-specific, and is channel-specific.

Determines the separator used between regexps when shown by the list command.

supybot.plugins.MessageParser.maxTriggers

This config variable defaults to "0", is network-specific, and is channel-specific.

Determines the maximum number of triggers in one message. Set this to 0 to allow an infinite number of triggers.

supybot.plugins.MessageParser.public

This config variable defaults to "True", is not network-specific, and is not channel-specific.

Determines whether this plugin is publicly visible.

supybot.plugins.MessageParser.rankListLength

This config variable defaults to "20", is network-specific, and is channel-specific.

Determines the number of regexps returned by the triggerrank command.

supybot.plugins.MessageParser.requireManageCapability

This config variable defaults to "admin; channel,op", is network-specific, and is channel-specific.

Determines the capabilities required (if any) to manage the regexp database, including add, remove, lock, unlock. Use 'channel,capab' for channel-level capabilities. Note that absence of an explicit anticapability means user has capability.

supybot.plugins.MessageParser.requireVacuumCapability

This config variable defaults to "admin", is network-specific, and is channel-specific.

Determines the capability required (if any) to vacuum the database.