Introduction to irssi

There are a load of IRC clients for UNIX-based systems out there, but I personally feel that irssi suits me best. Incredibly flexible, adjustable for every user, and doesn’t depend on X to be able to run it. Haven’t really found a guide out there that explains things in an easy and understandable manner, aimed particularly at new users. So here’s my attempt at it.

Getting started

What we need, of course, is irssi itself. You can get it at http://www.irssi.org/download, or use your system’s package manager to download it.

..for RPM-based systems.

..for Debian/Ubuntu type of distributions.

Now, once installed, you can fire up irssi by typing

..in the commandline. You should now be running irssi, whoo!

Customizing the settings

Now that irssi is up and going, you can change the settings, adjust it so that if suits you. By typing:

you will get a list of settings. For instance, let’s try out /SET nick. This is what pops up:

Here you see the various settings containing the word nick. irssi will automatically set your nick based on your account name. So if your username on your machine is foo, irssi will set your nick to foo. You can of course change this:

..followed up by a /SAVE and /RELOAD to save and reload the settings.

Note: Every time you change a default setting, you will have to use /SAVE to save the configuration.

Connecting to an IRC-network

The usual way to connect to an IRC-network is to use /SERVER or /CONNECT. After having started up irssi, you can type:

This will then connect me to the server powertech.no.eu.dal.net on the DALnet network. At the same time though, I’d like to be on the EFnet network. You can connect to multiple networks by typing:

This connects you to the EFnet network as well. You are perhaps wondering how you can change from one network to the other? Look at your status-window. This is usually window number 1. Use ALT-1 or ESC-1 to change to that window. Right now my active network is EFnet, on the server irc.homelien.no. Which means that I’m seeing this:

«Change with ^X» – As you’ve probably guessed, ^X means Ctrl-X, so upon pressing it, you will change your active network. You will see something like this in your status window:

To disconnect from one of the servers, or stop irssi’s attempt at reconnecting, use:

  • /DISCONNECT – Disconnects server with tag network.
  • /DISCONNECT recon-1 – Cancels an attempt to connect to the server named recon-1.
  • /RMRECONNS – Cancels all attempts to reconnect.
  • /RECONNECT recon-1 – Will attempt to reconnect you to recon-1.
  • /RECONNECT ALL – Will attempt to reconnect to all the servers in the reconnection queue.

Navigation

You can scroll upwards/downwards with the Page Up / Page Down keys. If they aren’t working for you, you can use Meta-p / Meta-n, where Meta can be ESC and/or ALT.

Default behavior is that irssi pretty much creates hidden windows for just about everything. Hidden windows are created every time you join a channel or start a conversation. There are different ways to switch between them:

  • Meta-1 .. Meta-0 – Switch between window 1-10.
  • Meta-q .. Meta-o – Switch between window 11-19.
  • /WINDOW – Switch to window number .
  • Ctrl-p / Ctrl-n – Switch to the previous/next window.

Adding networks, servers and channels

On the network DALnet you have a function called Nickserv, which lets you register a nick, so that you can become the owner of it. To be able to use this nick you will have to identify to it when logging on to the IRC network. It’s a bit tiresome having to type /nickserv identify every time you connect. I’m assuming you want this a bit more automated? I at least do. :) But before we do this we have to do a couple of things. Like adding a network:

Note: use /IRCNET with version 0.8.9 and older.

For example:

To remove the network, use:

If you’d like to execute a command when logging on, like identifying to your nick, use -autosendcmd:

The command above automatically sends the identify-command to Nickserv when you log on. The -wait 2000 tells irssi to wait two seconds after having logged on to the server before sending the command.

Now that we’ve added a network, we need servers to go along with it. The command to do so is:

If you’d like to automatically connect to this server when you start irssi, simply add an -auto right after ADD. Specifying the port is optional.

So, first network, then server, now for a channel:

[password] is optional, use of it depends on if the channel you’re trying to join needs a password to be accessed.

Logging

irssi has the ability to log both away-messages and regular conversations in channels. Logging for away messages is enabled by default, but not regular logging. First, it’s possible to define what the away-log should log:

  • /SET awaylog_level MSGS HILIGHT – Defines what kind of messages to log.
  • /SET awaylog_file ~/.irssi/away.log – Defines the file the log should write to.

The easiest way of enabling logging, and not just away messages, is to execute:

Per default irssi logs to ~/irclogs/something.log. This can be defined by:

That is the default value. The path will automatically be created if it doesn’t exist. $0 points to the target (channel/nick). You can make irssi to automatically rotate the logs by adding a time/date stamp to the filename. You find more about the formatting used by typing man strftime in your commandline. Example:

%Y for year, %m for month and %d for day.

For more information about logging have a look at:

Scripts

If you’ve used other IRC clients, you’ve probably encountered the possibility to use scripts. Scripts can be used for various things, from showing a channel what song you’re currently playing to flaunting your machine’s hardware specs. A good site for scripts is http://scripts.irssi.org.

The scripts you download should be placed in ~/.irssi/scripts/. If the folder doesn’t exist, create it yourself. Once the script is placed there, you can load it in your irssi by doing a:

This is a good approach if you don’t want certain scripts to load when irssi starts. If you do however want them to load when starting irssi, create a symlink in the folder ~/.irssi/scripts/autorun, just create the folder if it doesn’t exist. symlink, what’s that? Well, it’s a special type of file that contains a reference to another file or directory in the form of an absolute or relative path. So in other words:

So the file is really in ~/.irssi/scripts, but you’ve made a shortcut to it from ~/.irssi/scripts/autorun. Pretty neat if you ask me.

To unload a script simply use:

Minor adjustments

It’s not just what I’ve mentioned above that you can adjust and customize to your own liking. Another thing is the use of themes. You’re probably using the default blue theme that irssi comes with, which is just fine for my use, but perhaps not for you. I do however like the minor modification just for kicks.

Every time you use /SAVE, a message like this will appear in your status window:

Settings are stored in the configuration file named config and the theme in default.theme. Both files are editable through a text editor. I’ve never really changed things manually in the config-file, but I’ve tampered with default.theme a bit, like what my own nick appears to me. Default appearance of your nick is like so:

Where YourNick is in bold white, while the inequality signs are in gray.

Open the file ~/.irssi/default.theme and find the line that says something like:

Change this to:

This will make the inequality signs turn red. Your nick will still be in white bold. But you can always change the inequality signs to something else. For instance:

Will make the parenthesis turn yellow. If you want to change the color of your nick, from default white to something else, find this line:

..and replace it with the color you want:

For a nice overview of colors, check out http://irssi.org/documentation/formats, and for more information about irssi, visit http://www.irssi.org/.

4 thoughts on “Introduction to irssi

  1. laamanni

    How about deleting a server from -ircnetwork? It happens easily that you accidentally type it wrong.

    Reply
    1. jorge Post author

      Hi! You can use:

      /NETWORK REMOVE <NAME>

      ..to remove the network. :) I’ll add it to the guide, thanks!

      Reply
  2. flaxious

    Navigation:

    You can also navigate windows in IRSSI pressing and the left or right arrow key. Very handy.

    Reply
    1. flaxious

      Let me do that again, cause it removed the alt between brackets thing.

      navigation:

      You can also navigate windows in IRSSI pressing the ALT key and the left or right arrow key. Very handy.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">