Limnoria-doc/use/plugins/messageparser.rst

102 lines
3.0 KiB
ReStructuredText
Raw Normal View History

2011-06-28 08:11:32 +02:00
.. _plugin-messageparser:
The MessageParser plugin
========================
2011-06-28 17:29:38 +02:00
Administration
--------------
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-messageparser-remove:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser remove [<channel>] [--id] <regexp>]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
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.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-messageparser-add:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser add [<channel>] <regexp> <action>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
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.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-messageparser-lock:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser lock [<channel>] <regexp>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
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.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-messageparser-unlock:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser unlock [<channel>] <regexp>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
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.
2011-06-28 17:29:38 +02:00
.. _command-messageparser-vacuum:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser vacuum [<channel>]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
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.
2011-06-28 17:29:38 +02:00
User commands
-------------
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-messageparser-show:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser show [<channel>] [--id] <regexp>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Looks up the value of *<regexp>* in the triggers database.
2011-06-28 08:11:32 +02:00
*<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.
2011-06-28 17:29:38 +02:00
.. _command-messageparser-rank:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser rank [<channel>]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
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.
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
.. _command-messageparser-info:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser info [<channel>] [--id] <regexp>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
Display information about *<regexp>* in the triggers database.
*<channel>* is only necessary if the message isn't sent in the channel
itself.
2011-06-28 08:11:32 +02:00
If option *--id* specified, will retrieve by regexp id, not content.
2011-06-28 17:29:38 +02:00
.. _command-messageparser-list:
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
messageparser list [<channel>]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-06-28 08:11:32 +02:00
2011-06-28 17:29:38 +02:00
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 paretheses.