irssi is a command-line IRC client. When properly configured, it can automatically reconnect and re-identify to channels without any user intervention. It is ideal for use within a reliable server shell, where your session is maintained between uses.
Step 1 – Install irssi
1 |
sudo apt-get install irssi |
Not using aptitude? Download from irssi.org
Step 2 – Install a theme
I use the Zenbarn theme. Save this theme (or another theme of your preference) in ~/.irssi/
Step 3 – Install scripts
I use the following scripts. Scripts are placed in ~/.irssi/scripts/
- ascii.pl – Prints text as ASCII art
- autoaway.pl – Controls your away status depending on your activity
- email_privmsgs.pl – Emails unread private messages to you
- nm.pl – Divides nicknames and channel text into two columns
Open any scripts you decide to use with a text editor and read the first few lines. Some scripts require configuration to be used properly. For example, you will need to set your email address to have private messages emailed to you.
To start a script automatically, create a symbolic link to it in ~/.irssi/scripts/autorun/
1 2 3 4 5 6 |
mkdir ~/.irssi/scripts/autorun cd ~/.irssi/scripts/autorun/ ln -s ../ascii.pl ascii.pl ln -s ../autoaway.pl autoaway.pl ln -s ../email_privmsgs.pl email_privmsgs.pl ln -s ../nm.pl nm.pl |
If you prefer to start your scripts manually, or irssi is already running and you don’t want to restart it, use /script load scriptname.pl
Step 4 – Configure irssi
The following is my .irssi/config file. Add your commonly used networks and enter your personal information. If you decided against zenbarn, set the theme attribute to the your custom theme.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
servers = ( { address = "irc.freenode.net"; chatnet = "freenode"; port = "6667"; autoconnect = "yes"; }, { address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; }, { address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; } ); chatnets = { freenode = { type = "IRC"; autosendcmd = "/msg nickserv ghost mynick mypass;wait 2200;/nick mynick;wait 2000"; max_kicks = "4"; max_msgs = "3"; max_whois = "30"; }; EFNet = { type = "IRC"; max_kicks = "4"; max_msgs = "3"; max_whois = "1"; }; DALnet = { type = "IRC"; max_kicks = "4"; max_msgs = "3"; max_whois = "30"; }; }; channels = ( { name = "#digitalocean"; chatnet = "freenode"; autojoin = "yes"; }, { name = "#multirpg"; chatnet = "freenode"; autojoin = "yes"; } ); settings = { core = { real_name = "John Doe"; user_name = "mynick"; nick = "mynick"; }; "fe-text" = { actlist_sort = "refnum"; }; "fe-common/core" = { autocreate_own_query = "no"; autocreate_query_level = "DCCMSGS"; use_status_window = "no"; use_msgs_window = "no"; theme = "zenbarn"; activity_hide_targets = "#multirpg"; }; "perl/core/scripts" = { neat_maxlength = "10"; }; }; hilights = ( { text = "mynick"; nick = "yes"; word = "yes"; }, { text = "my nick"; nick = "yes"; word = "yes"; } ); ignores = (); |
Step 5 – Start irssi within a screen session
screen keeps a shell running even after you’ve disconnected from it. If you’re running irssi locally, you may not need to use screen. Enter the single command screen and read any information it prints. Once you are prompted for a command, start irssi by entering irssi
There is already an excellent guide on using irssi with screen, so I will only go over the basics below.
- Detach from the screen and return to your normal shell with Control+A, then press D
- Re-attach to the running screen with screen -rd
- Switch the currently active channel with Alt+(Channel #)