ZNC is an IRC bouncer with some pretty nice features. For a number of reasons I wanted to move my ircing from home to a shell, so I decided to give ZNC a try. ZNC isn’t in ports, but compiles fine using gmake.
The only problem I encountered was getting it set up to work with multiple networks in irssi. Configuring ZNC itself to put me on many networks was easy enough, and when I connected irssi to it for each network using /connect it worked fine. Using /server add to set up irssi’s server list didn’t work out so well.
Every time I tried to add another server (for connecting to another network), irssi would remove the first one. This is because irssi only considers a server’s hostname and port when trying to work out if it’s unique. When I added another server which differed from the first only by password and associated network, irssi assumed I was updating the existing one and changed it. Putting the required entries in irssi’s config by hand also didn’t work.
The solution was easy enough; one ZNC instance can listen on multiple ports, so I got it to listen on a selection of ports using multiple Listen directives in its config file, and then added each network’s server to irssi using a different port number.
Now I can take advantage of cool things like buffer replay and detaching from channels. Sorry, irssi-proxy – you don’t quite cut it now :)

hey, why do u start multiple instances of znc? you can create more than one user on one znc… just try it. enabling the webinterface makes things so much easier. :)
I am only running one ZNC, but I need it to listen on multiple ports else irssi can’t tell the difference between my networks. So I just have one ZNC listening on a couple of ports, and each network in irssi is configured with a different port number.
Have you tried to add the -ircnet switch to your connect statement ? I’m running two connects to the same znc without any problems.
I did yes, and it didn’t seem to help. Are you using -ircnet instead of -network because you’re using an old irssi or because you’re used to old irssi? :) Maybe older irssis don’t try to be so clever with the server list…
duck said I should comment.. znc is in ports now =)
cheers
even with 2 “Listen” statements and 2 configured users, i’m always connected to the same “user1″-account. can you plz show your anonymized znc.conf / irssi.conf? tia, llutz
llutz: I had the same issue. For me these entries in irssi config file in the chatnets section did the trick: znc1 = { type = “IRC”; username = “username1″; }; znc2 = { type = “IRC”; username = “username2″; };
Patch is here: http://dev.exherbo.org/~ahf/pub/software/patches/irssi/0001-Fix-server-add-issue-when-trying-to-add-a-already-kn.patch
and it was applied in trunk on 20100321, so only the latest stable would contain this work around
Do you have an example of how you defined different ports to each network?
Hoping for a response as the topic’s so old, but I’ve run in to the same issue and it’s the only thing holding me back from loving znc.
irssi considers address/port pairs for servers unique.
To get around that limitation, you can either set up your bnc to listen on different ports for each user/chatnet, or you can use a different (fake) name for each server address.
I think the latter is more elegant and resource efficient.
In ~/.irssi/config:
servers = ( { address = “fake.efnet.kk”; chatnet = “EFNET”; port = “55555″; password = “bncpassEFNET”; }, { address = “fake.freenode.kk”; chatnet = “FNODE”; port = “55555″; password = “bncpassFNODE”; } )
chatnets = { EFNET = { type = “IRC”; username = “bncuserEFNET”; }; FNODE = { type = “IRC”; username = “bncuserFNODE”; }; };
In /etc/hosts:
123.123.123.123 my.bnc.com fake.efnet.kk fake.freenode.kk
Thus, the fake addresses all resolve to your bnc address and all is fine.
Well, I know this post is way overdue but I have to say it. One of the reasons that ZNC has the ability to have more than one user is so you can connect to multiple networks… just create a user for each network.. then in IRSSI connect to ZNC with each user and there you go.. u are on different network without the need to use different ports etc.. just a thought ;) better late than never…
Ever heard of ‘screen’? screen + irssi > znc
No need to run a bouncer for that.
At the time I set this up, irssi ran on my server at home (inside screen) which had an unstable connection and I didn’t want to reveal my IP. ZNC also has the benefit of letting me connect from multiple clients and catch up, which is handy with e.g. my phone or a web-based IRC client.
hey what about on the windows version of irssi, having problems with autoconnecting and reconnecting on znc. Im fine with autoconnecting on startup with everything else but znc (auto connect username:pw) get back thanks.
well just connecting even with znc entirely