Setting up IRSSI for IRC

This guide shows how to setup IRSSI (a linux IRC client) on a Linux server. This guide has been tested on Ubuntu, Debian and Redhat.

Step 1 - Download IRSSI

sudo apt-get install irssi

(if this command fails, try updating your apt repository with [cc lang="bash"]sudo apt-get update[/cc]

Step 2 - Customise the config

servers = (
{
address = "irc.server1.example.com";
chatnet = "Work";
port = "6697";
use_ssl = "yes";
ssl_verify = "no";
autoconnect = "yes";
},
{
address = "irc.server2.example.net";
chatnet = "School";
port = "6667";
use_ssl = "yes";
ssl_verify = "no";
autoconnect = "yes";
}
);

chatnets = { Work = { type = "IRC"; }; School = { type = "IRC"; }; };

channels = (
{ name = "#channel1"; chatnet = "Work"; autojoin = "Yes"; },
{ name = "#channel2"; chatnet = "Work"; autojoin = "Yes"; },
{ name = "#channel3"; chatnet = "Work"; autojoin = "Yes"; },
{ name = "#channel4"; chatnet = "School"; autojoin = "No"; }
{ name = "#channel5"; chatnet = "School"; autojoin = "Yes"; }
);

settings = {
core = { real_name = "#REAL NAME"; user_name = "#IRC USERNAME"; nick = "#IRC NICKNAME"; };
"fe-text" = { actlist_sort = "refnum"; };
"fe-common/core" = {
autolog = "no";
autolog_path = "~/irc//$tag/$0.log";
};
};

hilights = ( { text = "#IRC USERNAME"; nick = "yes"; word = "yes"; } );

This configuration can be totally customised according to your needs. If you can specify multiple things, like servers or channels, simply copy and paste the bit including the {} and place a ' , ' on the end to add more to the list.

The first array , servers, allows you to connect to multiple servers. The key tags to look at are "address" which is the address of the server, "chatnet" which is a friendly name to which you will refer to the server from now on, and "use_ssl" which is for if your server supports SSL.

The second array, chatnets tells the client that both chatnets we setup previously use the IRC protocol. There are others, but we won't cover that here.

The third array, channels specifies IRC channels which you would like to join when you start the server. You can leave this blank, and join the channels using the /join #CHANNEL command. If you have multiple servers configured, you may need to use /join -CHATNET #CHANNEL, for example /join -Work #downtimealerts.

The fourth array, settings, specifies global settings for your client, like your name.

  • #REAL NAME = "John Smith"
  • #IRC USERNAME = "smithy" (this means you will appear as smithy in chats)
  • #IRC NICKNAME = "john" (this is optional if you would like to have a nickname)
autolog and autolog_path allow you to make a log of all IRC conversation to read back over later if you like. Simply set autolog to 'yes' and autolog_path to where you would like to log to.

Finally, hilights makes it so that your username is highlighted on your client when you say something. This helps you see what you've said if there's a lot of conversation going on.

Step 3 - Setup IRSSI

Now, we're ready to go. Lets make a folder in your home directory for the config.
mkdir ~/.irssi

Now, paste in your customised config as above. Save and exit.

 nano ~/.irssi/config

So now we have a directory in your home directory containing your customised config, let's run irssi and see if it works.

Step 4 - Run IRSSI

One potential problem with IRSSI is that it has to be running in order to receive messages, otherwise you will miss them.

If you just want to pop onto IRC for a second, you can run it with:

irssi

(exiting with ctrl-c)

OR, you can set it up in a screen, making it run in the background on your machine until you want to look at it again.


screen -dmS irc irssi

screen -r irc

And now, when you want to quit IRSSI, instead of pressing ctrl-c as you would running it locally, press ctrl-a followed by d. This will 'detach' from the screen, allowing you to check IRC again later with screen -r irc.

On some systems, you may have to install screen beforehand, using [cc]sudo apt-get install screen[/cc]

Appendix - IRSSI Commands

ctrl-p / ctrl-n = Move forwards and backwards through pages

/join -chatnet #channel = Join a channel on a specific server.

/nick nickname = Set your nickname

/part = Leave a channel. (navigate to its page first)

ctrl-a d = Detach from screen session, leaving IRSSI running in the background