Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

historical in-channel regex substitution #13

Open
shabble opened this issue Sep 23, 2011 · 1 comment
Open

historical in-channel regex substitution #13

shabble opened this issue Sep 23, 2011 · 1 comment

Comments

@shabble
Copy link
Owner

shabble commented Sep 23, 2011

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

@ailin-nemui
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants