If you use screen + irssi a lot, you’ll know that sickening feeling when “screen -r” gives you a message that there are no screens to be resume. This happens when the computer is rebooted, and you lose all your screens. To add salt to the wound, you probably had your channels in some very specific window. For example, #seneca could be windows 2 and #developers could be window 6. And you can’t quite remember what was between 2 and 6.
While I can’t solve the computer rebooting problem, I have figured out a way to make connecting back to all your channels painless.
The first thing you have to do is create a network. A network would then contain a list of channels. Here’s the syntax to create a network :
/network add -nick cesar -realname “Cesar Oliveira” -autosendcmd “/^msg nickserv identify password” mozilla
It’s pretty self-explanatory.
-autosendcmd sends a message to the server once you are connected. In my case, I identified myself to nickserv with my cryptographically strong password (The /^msg means I don’t want to see the input. That way it doesn’t open up a new query window in irssi).
The last parameter is just the name of the network, which doesn’t have to be the same name as the server your connecting to (eg. irc.mozilla.org).
Then you add channels:
/channel add -auto #seneca mozilla
/channel add -auto #firefox mozilla
…
/channel add -auto #kittens mozilla
mozilla should correspond to your network. #seneca will be window 2, #firefox will be window 3…
Finally, when you get disconnected, you can connect to the irc server :
/connect -ssl -network mozilla irc.mozilla.org
Enjoy!