Limnoria/plugins/SedRegex
James Lu e831d0e8ec SedRegex: make the regexp process timeout configurable
Although the default has been adequate on my systems, busy or low-powered machines may fail to process regexps quickly enough and cause SedRegex to sporadically error.

Reported by @cottongin via IRC.

From: 51ff41251b
2020-01-01 21:55:58 -08:00
..
local Import SedRegex plugin as of 2a556a1b84 2020-01-01 21:55:57 -08:00
__init__.py Import SedRegex plugin as of 2a556a1b84 2020-01-01 21:55:57 -08:00
config.py SedRegex: make the regexp process timeout configurable 2020-01-01 21:55:58 -08:00
plugin.py SedRegex: make the regexp process timeout configurable 2020-01-01 21:55:58 -08:00
README.md SedRegex: add configuration / usage instructions 2020-01-01 21:55:58 -08:00
test.py SedRegex: skip testBoldReplacement on Python 2 2020-01-01 21:55:58 -08:00

History replacer using sed-style expressions.

Configuration

Enable SedRegex on the desired channels: config channel #yourchannel plugins.sedregex.enable True

Usage

After enabling SedRegex, typing a regex in the form s/text/replacement/ will make the bot announce replacements.

20:24 <~GL> helli world
20:24 <~GL> s/i/o/
20:24 <@Lily> GL 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: replace only messages from the caller