IRC, or Internet Relay Chat, is a fantastic method of communication with peers, particularly if you are part of a development group or want to get support with a particular piece of software or project.

Many IRC networks, particularly the Freenode network, cater to a lot of open source and Linux-based groups that can offer support or provide a meeting place for development effort.

There are many IRC clients available, but one of the most extensible and powerful is the command-line based Irssi. In particular, using a CLI-based client, of any kind, offers many unique possibilities -- from using it remotely via SSH to using screen to manage and share "connections" to the client.

Irssi, like most CLI programs, uses a flat-text configuration file: ~/.irssi/config. This configuration file can be heavily customised and can connect to multiple servers at start and issue various commands based on channel or server. For instance, to connect to Freenode at start, use:


servers = (
  {
    address = "irc.freenode.net";
    chatnet = "freenode";
    port = "6667";
    autoconnect = "yes";
  }
);

To configure Irssi to automatically authenticate your nickname on Freenode, you would use:


chatnets = {
  freenode = {
    type = "IRC";
    autosendcmd = "/^msg nickserv identify secret;wait 2000";
max_kicks = "4"; max_msgs = "1"; max_modes = "4"; max_whois = "1"; };

This will send the command /msg nickserv identify secret (where "secret" is your password), and then wait for nickserv to respond before executing further commands on that server.

Channel definitions are designed thus:


channels = ( 
  {
    name = "#annvix";
    chatnet = "freenode";
    autojoin = "yes";
    autosendcmd = "/^msg chanserv op #annvix";
  },
  {
    name = "#oss-security";
    chatnet = "freenode";
    autojoin = "yes";
    autosendcmd = "/^msg chanserv op #oss-security";
  }
);

This defines two channels that are automatically joined, and the pause after messaging nickserv is made apparent as new commands are being sent to chanserv to obtain ops on the two channels — a command that would fail if the used nickname had not been authenticated yet.

Obviously, there is a lot more to Irssi than just auto-connecting to channels and servers. Visit the Web site to view the variety of themes that can be used to customise its look and feel, and look at the Scripts page to see the variety of scripts that can be used with Irssi. Perl is the language that can be used with Irssi, which makes scripting it very powerful. If you're looking for a good IRC client, give Irssi a try. It has a little bit of a learning curve, but it's well worth the effort.

Open Sourcery This was published in Open Sourcery, check every Monday for more stories

Related links

Leave a comment

You must read and type the 6 chars within 0..9 and A..F

* indicates mandatory fields.

Log in


Sign up | Forgot your password?

  • Staff Share a keyboard and mouse with Synergy

    Even in the era of virtualization, many IT pros (including myself) have a small army of computers sitting on, under, and around their desks. Read more »

    -- posted by Staff

  • Staff Android devs less than gruntled

    Yet more discouraging news on the Android front. Having hacked off its developer community by releasing updated SDKs to just a small group of chosen devs, Google has now given the brush-off to a petition that called for more to be given to the wider community. Read more »

    -- posted by Staff

  • Staff VMware shows how not to do it

    As a developer there will be a time when you ship a bug -- be it a stub that you left in, or a flaming, crashtastic segfault. The next time this happens and your bosses come baying for blood, point them in the direction of VMware, who this week gave the developer world a great example of how to ship a showstopper bug. Read more »

    -- posted by Staff

What's on?

  • Club Builder: Captain Obvious vs the Crackpots

    In the case of the bleeding obvious, IBM says open source needs good designers; a claim is made that China can activate your phone to snoop on you; and we take a look at the Defcon conference.