Characters to support as delimiters in the replace expression.
The SedReplace plugin stores a buffer of the last said line of every user, and if a new message comes in with a sed-replace-like pattern in it, tries to apply it on the original message as a regex-like replace.
Initialises the records of previous messages from a user when they join a channel.
Initialises the records of previous messages from a user when they join a channel.
Parses a channel message and looks for any sed-replace expressions therein, to apply on the previous message.
Removes the records of previous messages from a user when they leave a channel.
Removes the records of previous messages from a user when they quit.
Sets up a fiber to periodically clear the lists of previous messages from users once every timeBetweenPurges.
sed-replaces a line with a substitution string.
Private sed-replace implementation.
Performs self-tests against another bot.
Struct aggregate of a spoken line and the timestamp when it was said.
All sed-replace plugin settings, gathered in a struct.
The SedReplace plugin imitates the UNIX sed tool, allowing for the replacement/substitution of text. It does not require the tool itself though, and will work on Windows too.
It has no bot commands, as everything is done by scanning messages for signs of s/this/that/ patterns.
It supports a delimiter of /, |, #, @, , _ and ;, but more can be trivially added. See the DelimiterCharacters alias.
You can also end it with a g to set the global flag, to have more than one match substituted.