The advanced playback module [1] makes it possible for IRC clients to avoid undesired repetitive buffer playback. IRC clients may request the module to send a partial buffer playback starting from a certain point of time.
Furthermore, the latest ZNC master [2] has support for persistent query buffers [3]. A client may choose to keep query buffers until they get explicitly closed in the GUI. This can be also easiest done via the same playback module to avoid undesired responses from ZNC [4].
Together with the mymsg plugin [5], these two features bring IRC experience with ZNC on whole different level.
EDIT: Removed references to the quick and dirty example implementation that no longer exists. The fork where it was stored no longer exists.
[1] http://wiki.znc.in/Playback
[2] https://github.com/znc/znc/pull/598
[3] http://wiki.znc.in/Query_buffers
[4] https://github.com/znc/znc/pull/620
[5] https://github.com/TingPing/plugins/blob/master/HexChat/mymsg.py
PS. Please consider making the client capable of receiving messages from self without an additional mymsg plugin.
I'd almost say this belongs in a plugin. It seems fairly simple but it's way more ZNC specific than server-time.
@jpnurmi Mind checking out https://github.com/hexchat/hexchat/tree/znc
EDIT: After thinking about it, I think the plugin should just store a single timestamp per server. No reason to keep one per context with the current usage.
Looks promising! I've been playing around with it and noticed that something goes wrong with timestamps, though. It's often replaying channel messages that I've already seen. Looks like if I disconnect right away and then reconnect, I get the same playback again.
I noticed that too, it couldn't be anything in the plugin though. Did you notice similar issues in your WIP branch?
Seems to work with wip/playback. Some random thoughts that might help solving the issue:
one timestamp per connection is enough
Already did that locally, issue still exists.
Looks like if I disconnect right away and then reconnect, I get the same playback again.
I noticed that too, it couldn't be anything in the plugin though.
I had a short disconnect and reconnect with ZNC and it sent me a message in a channel that happened during the disconnect period (confirmed from another client). This was _without_ playback support. Perhaps it retries unacked sends from the broken connection onto the new one. So if HC had asked for playback support it would probably have gotten that message twice.
Any news on the progress of this?
@jpnurmi, 404 on your links. :cry:
I took another shot at a plugin that seems to work better: https://github.com/TingPing/plugins/blob/master/HexChat/playback.lua
I had a short disconnect and reconnect with ZNC and it sent me a message in a channel that happened during the disconnect period (confirmed from another client). This was without playback support. Perhaps it retries unacked sends from the broken connection onto the new one. So if HC had asked for playback support it would probably have gotten that message twice.
isn't this just standard ZNC buffer though, nothing to do with the [[playback]] module for znc.
@TingPing your most recent playback.lua
script worked ok for me, though I still observe replaying messages I've already seen as well. Thanks though this is better than nothing :)
@TingPing your most recent playback.lua script worked ok for me, though I still observe replaying messages I've already seen as well. Thanks though this is better than nothing :)
Note that script doesn't save timestamps to disk on purpose.
Most helpful comment
Any news on the progress of this?