Limnoria/plugins/SedRegex
James Lu b05fe01d66 SedRegex: reword "search not found" error
"Search not found in the last X *messages*" is a bit confusing because this is really counting the entire history, which includes all other lines of IRC communication (this means pings, /NAMES replies and so on).
2020-10-12 19:48:56 -07:00
..
local Import SedRegex plugin as of 2a556a1b84 2020-01-01 21:55:57 -08:00
__init__.py SedRegex: allow matching text with the trailing suffix missing 2020-04-02 10:00:40 -07:00
config.py SedRegex: abort when a search times out 2020-01-01 21:55:58 -08:00
constants.py SedRegex: ignore regexp-like messages sent before the plugin is active 2020-10-12 19:45:18 -07:00
plugin.py SedRegex: reword "search not found" error 2020-10-12 19:48:56 -07:00
README.md README: specifically mention that /s is specific to this plugin 2020-01-01 21:55:58 -08:00
test.py SedRegex: ignore regexp-like messages sent before the plugin is active 2020-10-12 19:45:18 -07: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: (custom flag specific to this plugin) replace only messages from the caller