An Overview of IRC and irssi

From DIT NetSoc

Jump to: navigation, search
Irssi on the InterSocs network
Enlarge
Irssi on the InterSocs network

Contents

What is IRC?

Internet Relay Chat (IRC) is a type of real-time group chat organised into rooms called "channels". It was created in 1988 by Jarkko Oikarinen to replace a program called Multi-User Talk (MUT).

IRC Networks are often made up of several nodes for different geographical areas or groups; for example, the InterSocs IRC network is made up of nodes installed in each participating college. Well known networks include QuakeNet, which is mostly directed towards gamers, Freenode and OFTC, which are for the discussion of Free/Open Source Software.

IRC Networks are controlled by services such as NickServ (for registering nick names for protection), ChanServ (used to control and protect individual channels) and MemoServ (used to send memos to individual users).

What is irssi?

Irssi is a console-based client for connecting to IRC networks. It's a relative new-comer in the console-based IRC client arena but is quickly gaining popularity among those who might have previously used BitchX or ircII. Among the reasons for its quick adoption are its intuitive windowing system, its simple interface and the ability to easily plug in Perl scripts for more advanced functionality.

So, how do I use it?

You can use irssi on calculon to connect to the InterSocs IRC network - in fact, it should already be configured to do this for you! Simply run:

you@calculon:~$ irssi

...and you'll be connected to the DIT NetSoc IRC node. You'll also be joined to two channels, our own one (you'll know it when you see it) and #intersocs, which is the general InterSocs channel.

If you wish to connect to other IRC networks with irssi (NB:This is NOT possible from your NetSoc account) use the /connect command. So, to connect to freenode you'd use:

/connect irc.freenode.net

Windows

Window 1 is the control window. Messages from IRC Services like NickServ go here. Other windows are channels. You can switch between them with alt-n where n is the number of the window you wish to switch to, so if you want window 2 press alt-2.

The numbers of the windows in the status bar are highlighted in different colours to draw your attention when different events take place in their channels. Blue is for status messages such as people joining and parting or channel mode changes, white is for chat and pink is for when someone addresses you or sends you a private message. You can see in the screenshot at the top of the page that window 3 is highlighted. This means there's been some chat in the channel on window 3 since you last visited it.

NB: Some terminals, such as xterm, don't switch windows with alt. The terminal must be configured to send an escape character with alt. Using xterm this is achieved by holding Ctrl and left clicking on the window. A menu should appear - select 'Alt sends Escape' and it should work as normal. Alternatively you can press Esc, then the number of the window you want.

When you are connected to multiple networks all their messages will appear in window 1. While window 1 is open use ctrl-X to switch between networks for issuing commands to each one.

To close a window (such as a private chat) use /window close

Where's the Nicklist?

There isn't one... Luckily there is a script installed which creates one for you! You'll need to run irssi inside a screen session (see: An Introduction to GNU/Screen) like so:

you@calculon:~$ screen irssi

Then run the following commands in irssi:

/nicklist screen
/set nicklist_automode screen
/save

If the nicklist is too long to fit in your terminal you can bind keys to scroll it up and down. For example, to bind ctrl-U to scroll up and ctrl-D to scroll down use:

/bind ^D command nicklist scroll +10
/bind ^U command nicklist scroll -10
/save

NB: Nicklist does NOT work in gnome-terminal. An alternative to using a Nicklist is the /names command.

Some other IRC commands

/msg [user] [message] - Initiates a private with a user by sending them a message so to message bob with "Hello!" you'd use:

/msg bob Hello!

Note, this works with all users on a network, not just the current channel.

/nick [newnick] - Change your nick. If you wanted to be known as foo you'd use:

/nick foo

/join [#channel] - Join a channel. If you wantod to join #bar you'd use:

/join #bar

/away [reason] - Set away - lets other users know you're not available. If you're going out for the night you might use:

/away be back tomorrow!

Issue /away again with no parameters to let people know you've returned.

/help [command] - Get help on any command. To get help on the /topic command use:

/help topic

/help on its own gives you a list of available commands. Help appears in window 1 on irssi.

Scripts

You can change the behaviour of irssi (or most any IRC client) by adding scripts. Irssi's scripts are written in Perl.

There is a collection of scripts to do all sorts from flood/spam protection to handing out coffee at scripts.irssi.org. To install them simply copy/move them to .irssi/scripts/ in your home directory. Let's say we want to install the Magic 8 ball script:

you@calculon:~$ wget http://scripts.irssi.org/scripts/8-ball.pl
you@calculon:~$ mv 8-ball.pl ~/.irssi/scripts/

You may need to mkdir ~/.irssi/scripts/. To load the script inside irssi:

/script load 8-ball.pl

To unload the script:

/script unload 8-ball

To have the script run at startup you can copy/move it to ~/.irssi/scripts/autorun:

you@calculon:~$ mv  ~/.irssi/scripts/8-ball.pl ~/.irssi/scripts/autorun

You may need to mkdir ~/.irssi/scripts/autorun.

Alternatives

To connect to the InterSocs IRC network you can also use XChat in a remote VNC desktop (see: Remote Desktop Tutorial).

It's also possible to tunnel the IRC service to a local port and connect to it with the client of your choice. Using ssh you might use:

$ ssh -L 6667:localhost:6667 netsoc.dit.ie

Or you can add a tunnel to PuTTY before opening the session:

image:Putty.png

When this is done connect to the server on 'localhost' in your IRC client.

Personal tools