From 9d0dce6ef5034f1fc923a870f6865b2a7b05e828 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 17 Dec 2016 20:48:20 -0800 Subject: [PATCH] SedRegex: add configuration / usage instructions --- SedRegex/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/SedRegex/README.md b/SedRegex/README.md index 5127f0f..62b423d 100644 --- a/SedRegex/README.md +++ b/SedRegex/README.md @@ -1 +1,25 @@ 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