Limnoria/plugins/SedRegex
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 SedRegex plugin as of 2a556a1b84 2020-01-01 21:55:57 -08: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
constants.py SedRegex: ignore regexp-like messages sent before the plugin is active 2020-10-12 19:45:18 -07:00
plugin.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00
README.rst Remove references to my old nick 2021-07-03 16:42:13 -07:00
test.py Revert generic 'The Limnoria Contributors' in copyright notices 2021-10-17 09:57:55 +02:00

Documentation for the SedRegex plugin for Supybot

Purpose

History replacer using sed-style expressions.

Usage

Enable SedRegex on the desired channels: config channel #yourchannel plugins.sedregex.enable True After enabling SedRegex, typing a regex in the form s/text/replacement/ will make the bot announce replacements.

20:24 <jlu5> helli world
20:24 <jlu5> s/i/o/
20:24 <Limnoria> jlu5 meant to say: hello world

You can also do othernick: s/text/replacement/ to only replace messages from a certain user. Supybot ignores are respected by the plugin, and messages from ignored users will only be considered if their nick is explicitly given.

Regex flags

The following regex flags (i.e. the g in s/abc/def/g, etc.) are supported:

  • i: case insensitive replacement
  • g: replace all occurences of the original text
  • s: (custom flag specific to this plugin) replace only messages from the caller

Configuration

supybot.plugins.SedRegex.boldReplacementText

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

Should the replacement text be bolded?

supybot.plugins.SedRegex.displayErrors

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

Should errors be displayed?

supybot.plugins.SedRegex.enable

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

Should Perl/sed-style regex replacing work in this channel?

supybot.plugins.SedRegex.ignoreRegex

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

Should Perl/sed regex replacing ignore messages which look like valid regex?

supybot.plugins.SedRegex.processTimeout

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

Sets the timeout when processing a single regexp. The default should be adequate unless you have a busy or low-powered system that cannot process regexps quickly enough. However, you will not want to set this value too high as that would make your bot vulnerable to ReDoS attacks.

supybot.plugins.SedRegex.public

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

Determines whether this plugin is publicly visible.