irssi-scripts icon indicating copy to clipboard operation
irssi-scripts copied to clipboard

historical in-channel regex substitution

Open shabble opened this issue 14 years ago • 1 comments

Idea

In some channels it's commonplace to correct your mistakes with a pseudo-regex, for example:

<Foo> I love badgers!
<Bar> Badgers, really?!
<Foo> s/badgers/horses/

Instead of mentally parsing it, get irssi to do it!

It needs some security and sanity checking for the replacement string, and should have a couple of thresholds / restrictions. Something like:

  • users can only modify their own lines
  • items beyond a certain number of lines aren't touched
  • items older than a certain threshold aren't touched
  • s/a/b/g isn't allowed (but difficult to generalise - how little is too little. Maybe run the match and count the number of matches?
    • Only the first N possible matches will be applied?

Other notes:

  • There should be a visual cue to indicate it's been applied (* at the start/end of the line, maybe)
  • Do you remove the line which contains the replacement command?
  • Have to ensure it only gets applied to actual message contents, not parts of the UI /formats (timestamps, nicks, etc)

See Also

https://github.com/shabble/irssi-scripts/blob/master/feature-tests/linehax.pl

shabble avatar Sep 23 '11 11:09 shabble

http://anti.teamidiot.de/static/nei/*/Code/Irssi/typofix.pl

ailin-nemui avatar Jun 19 '15 19:06 ailin-nemui