fishroom
fishroom copied to clipboard
Configurable filters for reply-quote text in IRC
On #archlinux-cn, the results of replying to someone can be highly annoying, if the replied message contains a command, e.g. 'google
(varia bot).
It would be great if users can supply functions to filter the thing...
Hmm, give an example? that what kind of reply message format is better, so that I can implement it.
Cheers,
I am not asking for a better format, just some filter that can avoid generation of bot commands.
For example, s/'([a-z])/’\1/g
should be used on archlinux_cn.
I don't understand. On what situation you wanna filter bot commands? Filter IRC commands' appearance in fishroom or what? Give me an example of the message flow. like this:
A: 'google something
gbot: blahblahblah
and A's message shouldn't appear in fishroom.
u can give me screenshots or whatever, just point out, which message, on which direction (e.g. irc to tg) should be filtered.
0001 a@tg: 'google foo
0002 varia@irc: <results for foo>
0003 b@tg: <reply msg 0001> blah
irc-> [b]: (a 'google foo...) blah
0004 varia@irc: <results for foo...) blah>
And everyone is unhappy.
but why ^(Re: a 'google foo)
could trigger varia
Because varia matches for commands all through the text. I think the author did that in order to make sure that bridge-bot users can use the bot.
Actually, as a tg-bridge user myself, I use varia to trigger smbot and other IRC bots.
This kind of substitution would cause "quote injection", maybe tomorrow someone would compain about why the quote was substituted.
Write some config options to accept functions (perfectly valid in py) and let them 撕逼.
In the end they will write a varia command matcher...