To create new wiki account, please join us on #znc at freenode and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Query buffers

From ZNC
Revision as of 19:08, 10 August 2014 by Jpnurmi (talk) (Self messages)
Jump to: navigation, search

ZNC 1.6 introduces full-featured playback buffers for private messages aka queries.

Background

Prior ZNC 1.6, private messages were stored to a shared query buffer. Private messages were buffered only when no client was connected, and the buffer was automatically cleared after playback. The drawback was that it was not possible to replay the query buffer. For example, if you checked your private messages with a mobile client while on the go, it would clear the query buffer and make it hard to get back to it later when connecting with another client. Or when connecting to ZNC with a client from home, you wouldn't see any private messages you received meanwhile if you had left a client open at work.

The reason why it was handled like this was that "query" is a client side concept. ZNC can automatically manage channel buffers based on explicit requests from connected clients to join and leave channels. However, ZNC does not know when a query is closed in a client. If private messages were always buffered, the query buffers would pile up in an uncontrollable manner.

Query buffers

In order to enable persistent query buffers, disable the AutoClearQueryBuffer config option. This can be done via controlpanel, webadmin, or znc.conf. This ensures that private messages are buffered even when there are connected clients, and the buffers are not automatically cleared after playback.

Due to the problems explained in the previous and next sections, this feature does not just work out of box in any client. To avoid query buffers piling up, either a client/script must clear the appropriate buffer by sending /msg *status clearbuffer <name of the query/receiver> (when a query is closed), or you could use for example the clearbufferonmsg module.

Self messages

The whole idea behind this feature is to keep the private discussion history between you and the other participant. It would effectively cripple the discussion if you weren't able to see your own messages. However, not all clients are capable of presenting in a sensible way such received messages where the sender is the user itself. Settings AutoClearQueryBuffer=true does require a client that is capable of handling self messages.