Allows hooking into query buffer playback before and after all the
lines of the query buffer are replayed. The EModRet return value
has no effect at the moment, but may be used in the future to e.g.
prevent playback. The Chan version of these signals use EModRet to
skip emitting the status message, but not the whole playback.
A regression caused by d0a58ff. Unlike for CChan, from which the
snippet was copy-pasted, for CQuery the params actually need to be
passed. Otherwise buffer playback PRIVMSGs have empty target nick.
Users who upgrade from <=1.4 to 1.6.0 and have configured 0 for channel buffer, were silently not getting any queries while disconnected anymore.
Thanks to jpnurmi for the idea how to bandaid this in 1.6.x branch.
Proper fix will go to 1.7 and will take form of separate settings for channel and query buffers.
See #967
The old internal storage format was:
::__:SAVEBUFF:__::<buffer lines>
The new storage format for channels:
::__:CHANBUFF:__::<buffer name>
<buffer lines>
The new storage format for queries:
::__:QUERYBUFF:__::<buffer name>
<buffer lines>
See #802 for details why the storage format had to be changed. Reading
the old storage format is still supported so old saved buffers load as
appropriate.
To let modules know whether a client is currently in playback mode.
The clientbuffer module (#343) wants to update "last seen message"
timestamps in OnSendToClient() but it must avoid doing that while
in playback mode.
This allows implementing timestamp-based (eg. client specific - #343)
filtering of playback buffers. For clients that don't support server-time,
getting an accurate timestamp out of a raw buffer playline is impossible.
Store query buffers per query the same way it's done for channels.
This allows clients to implement persistent query buffers. Queries
remain open across clients and sessions until a client explicitly
sends a command to clear a (closed) query buffer.
A new config option AutoClearQueryBuffer that default to false
ensures behavioral backwards compatibility, and another config
MaxQueries protects from OOM eg. due to PM attacks.