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

Query buffers

From ZNC
Jump to navigation Jump to 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 clients were 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, query buffers would pile up in an uncontrollable manner.

Query buffers

In order to enable persistent query buffers, disable the AutoClearQueryBuffer config option that is enabled by default. 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 query buffers are not automatically cleared after playback.

Due to the problems explained in the previous and next sections, this feature (AutoClearQueryBuffer=false) does not just work out of the 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. In addition to setting AutoClearQueryBuffer=false, a client must request the znc.in/self-message capability in order to receive self messages in buffer playback.

Client Support

  • Textual
  • Communi
  • Palaver
  • HexChat 2.12.1+ with mymsg.lua and optionally zncbuffer.lua (please note that the zncbuffer.lua plugin isn't needed to get znc.in/self-message capabilities to function, it's merely for convenience of playing back and erasing query buffers)

An expanded list of clients with znc.in/self-message support can be found here.

TL;DR

  • Make sure to use a self-message capable client
  • AutoClearQueryBuffer=false
  • /msg *status clearbuffer <query>