- 1 Connecting to ZNC
- 2 Tips & Tricks
Connecting to ZNC
Connections to ZNC using SSL:
/server add BNC my.bouncer.net/6697 -ssl -username=username/network -password=password -autoconnect /set irc.server.BNC.ssl_fingerprint MD5_or_SHA256_or_SHA512_fingerprint_here /connect BNC /save
Getting the SSL fingerprint
WeeChat 0.4.3 wants
md5 (insecure, deprecated) fingerprint (replace
-md5 below or better, upgrade), WeeChat 1.2 allows
cat ~/.znc/znc.pem | openssl x509 -sha512 -fingerprint -noout | tr -d ':' | tr 'A-Z' 'a-z' | cut -d = -f 2
It does not connect.
If port 6697 is the SSL port, you need to specify that it's SSL port with /set irc.server.BNC.ssl on
This is a failed attempt due to not specifying the "irc.server.BNC.ssl on" or "-ssl"
05:46:47 BNC =!= | irc: connection refused 05:46:47 BNC -- | irc: reconnecting to server in 10 seconds 05:46:57 BNC -- | irc: reconnecting to server... 05:46:57 BNC -- | irc: connecting to server my.bouncer.net/6697 (SSL)... 05:46:58 BNC =!= | irc: connection refused
This is for plain non-ssl connections.
/server add BNC my.bouncer.net/6667 -username=username/network -password=password -autoconnect /connect BNC /save
Specifying username/network:password later
/set irc.server.bnc.username username/network /set irc.server.bnc.password password
Tips & Tricks
Enabling server-time & other IRCv3 capabilities
WeeChat by default requests no IRCv3 capability from the server acting as not-IRCv3 capable client. This can be fixed with the following commands on WeeChat 0.3.7+:
/set irc.server_default.capabilities account-notify,away-notify,cap-notify,multi-prefix,server-time,znc.in/server-time-iso,znc.in/self-message /reconnect -all
You must reconnect for this to take effect. This list is "safe capabilities" (see the issue on top of this section) that are supported by WeeChat.
- account-notify (WeeChat 1.2+) makes the server inform when people login/logout or switch account. Requires cap-notify
- away-notify (WeeChat 1.1+) makes the server inform when people go away or come back eliminating the need of who-polling. Requires cap-notify
- cap-notify (WeeChat 1.4+) makes the server inform when capabilities come available or disappear. ZNC requires this from client for some capabilities as it cannot know what capabilities the server supports before it's connected and when ZNC gets disconnected from server the capabilities aren't supported anymore.
- multi-prefix (WeeChat 0.0.1+) makes the server tell you all prefixes (@+) in case users have multiple prefixes on channel. Without multi-prefix the server only tells the highest prefix and ZNC strips the other prefixes from commands.
- server-time (WeeChat 0.4.0+) (znc.in/server-time-iso before 1.7.0) makes ZNC send buffer playbacks without it's own timestamp (
12:00:00 <nick> [00:00:00] blahbecomes
00:00:00 <nick> blah).
- znc.in/self-message (WeeChat 0.3.0+) makes ZNC show PMs you have sent in query buffer playback.
For all capabilities supported by WeeChat, see
/help cap (WeeChat 1.4+) or
/help irc.server_default.capabilities (WeeChat 1.3 & older).
Disabling automatic switching of buffer
When you connect WeeChat to ZNC, your channels change a lot until you are joined everywhere. This can be disabled with the following commands:
/set irc.look.buffer_switch_autojoin off /set irc.look.buffer_switch_join off
Enabling /ZNC and other raw commands
WeeChat doesn't send unknown commands to server by default in fear of accidentally sending passwords or other sensitive content. You can disable this with
/set irc.network.send_unknown_commands on
Alternatively you can create Alias
/alias add znc /quote znc
Disabling charset plugin
ZNC (when compiled with libicu) has the option to do charset conversions. WeeChat does this by default too, but it's easy to disable
/plugin unload charset /set weechat.plugin.autoload *,!charset