This article discusses ZNC setup and how to connect with Emacs ERC.

ZNC admin interface

ZNC's IRC service and web admin service can share the same port, magical, but confusing. I seperated them into two ports, and restricted the web port to be only accessible from LAN.

ZNC Setup & Connection

ZNC user and password are different than IRC network's nick and password, which is usually managed by the network's NickServ.

A ZNC user can define multiple (network, nick) pairs.

To connect to ZNC, using any IRC client, use the following password format to authenticate:

1
znc_user@client_id/znc_network_name:znc_user_pass

The @client_id part can be omitted, if not using clientbuffer module.

Note for ERC: M-x erc-tls prompts for nick, DO NOT leave it empty, but put in the network nick, so ERC is not confused and have the buffer window bug (TODO: link).

ZNC management inside IRC

The *status bot (prefixed by *, configurable) is ZNC specific. You can /query *status and help from there. It provides all the functionalities for managing ZNC.

The modules all have corresponding bot: *module_name.

Multiple client and clientbuffer

This article: How to configure multiple clients against single ZNC network nick talks about the buffer playback problem and the solution by using clientbuffer.

Note that clientbuffer is a network level module, so you'll have to enable it per network.

1
msg *status loadmod clientbuf autoadd

Also at ZNC user level, don't forget to disable clear chan/query buffers.

ZNC external module building

Take clientbuffer as example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ----
# DO ALL THESE AS USER znc:
# ----

git clone https://github.com/CyberShadow/znc-clientbuffer.git

# requires znc-buildmod
# produces clientbuffer.so
make

# "install" it
mv clientbuffer.so ~/.znc/modules

# To load the module, use `loadmod` with *status bot