42wim/matterircd

'ACTION ...' shown to others when typing '/me ...' quickly after a message

jdstrand opened this issue · 7 comments

Reproducer:

In irssi, if I type quickly:

blah blah
/me ...

then others see (eg, matterhorn, web client):

<nick> blah blah
�ACTION ...�

but if I wait to type /me ... for a few seconds, then it is correctly displayed to others.

This was seen with 0.21.0 and 0.22.0.

42wim commented

I guess you have PasteBufferTimeout configured ?
If you're not going to paste stuff set to 0 otherwise set to a number that matches your typespeed or type slower ;-)

See https://github.com/42wim/matterircd/blob/master/matterircd.toml.example#L34

I do have it set to 'PasteBufferTimeout = 2500' which is set so I can paste stuff. However, regardless of how that is set, it seems odd that I get the unicode characters and ACTION when it sees '/me ...' and that this would be a detectable condition, but perhaps I am missing something?

42wim commented

So if you have it set to 0 you still have the same issue?

To specifically answer your question, no, it doesn't happen with PasteBufferTimeout = 0 and sure I can workaround it with that setting.

However I would like the be able to continue to use the PasteBufferTimeout and not have '�ACTION ...�' as part of the output for others since that isn't what I entered-- I only entered ascii during the period and not the text, 'ACTION'. I haven't looked at the code, but it seems possible to detect a '\n/slashcommand' during the PasteBufferTimeout and to do something with that information.

FWIW, can reproduce this with setting a large enough PasteBufferTimeout.

huBUTPnIzi

Would be nice to detect '\x01ACTION' in user.Decode() and break up the message into multiples (timer.Stop()?). Sadly, I'm not sure how to (easily?) implement that with the current code base.

42wim commented

fixed in master

Thanks! :)