indexwritings › irssi-connect

Irssi: Connecting to multiple networks

First add the network by its name. If you have Irssi 0.8.18 or newer, and if the network supports SASL, then you can specify your account & password here as well – for older versions, see "Auto-login with cap_sasl" below:

/network add -sasl_username fred -sasl_password foobar -sasl_mechanism PLAIN Freenode
/network add Foonetic

Now add at least one server to that network. Specify -auto if you want to connect automatically on startup, and -ssl -ssl_verify for a secure connection (if the network supports it):

/server add -auto -net Freenode -ssl -ssl_verify irc.freenode.net 6697
/server add -auto -net Foonetic -ssl irc.foonetic.net 6697

(The port is usually 6697 for SSL connections, and 6667 for insecure ones. However, some networks still use different SSL ports, e.g. 9999 on EFnet.)

If you want to auto-join some channels, you can add them the same way as well:

/channel add -auto #irssi Freenode
/channel add -auto #xkcd Foonetic

Finally, connect to the network:

/connect Freenode
/connect Foonetic

Auto-login with cap_sasl

Irssi version 0.8.18 has the SASL feature built in and enabled via /network, as shown above. But older versions need a separate cap_sasl.pl script – you can install it from scripts.irssi.org.

mkdir -p ~/.irssi/scripts/autorun
wget https://scripts.irssi.org/scripts/cap_sasl.pl -O ~/.irssi/scripts/cap_sasl.pl
ln -sf ../cap_sasl.pl ~/.irssi/scripts/autorun/

Now load and configure it inside Irssi:

/script load cap_sasl
/sasl set Freenode <login> <password> PLAIN
/sasl save