xkcd-Bucket icon indicating copy to clipboard operation
xkcd-Bucket copied to clipboard

New plugin for RE triggers?

Open zigdon opened this issue 12 years ago • 0 comments

Would be nice to have a plugin that will allow ops to set RE triggers. General idea would be define a trigger, and the response would be either a string or a factoid.

Bucket: addre /^real programmers/ text: Real programmers cite http://xkcd.com/378/
Bucket: addre /\brandom\b/ lookup: something random
Bucket: listre
1. /^real programmers/ text: Real programmers cite http://xkcd.com/378/
2. /\brandom\b/ lookup: something random
Bucket: deletere 2

Probably allow listre to accept a filtering argument.

List of REs will have to be checked against every new line, might want to consider limiting RE complexity or number of trigger. (set re_max_number?)

If implemented properly, should be able to replace the metabutterfly plugin.

zigdon avatar Dec 04 '13 19:12 zigdon