Recording an IRC channel on Linux/Ubuntu

by on April 21, 2008

in Gadgets/Hack

There are a ton of Interney Relay Chat (IRC) clients for Linux/Ubuntu, e.g. Gaim (now called Pidgin). One IRC client that makes recording an IRC conversation pretty easy is Irssi. Install Irssi on Ubuntu with a simple command:

sudo apt-get install irssi

Then run the program “irssi” from the command line.

Now suppose you want to record what’s going on in the #iphone channel, which runs on the IRC server irc.osx86.hu. Pick a nickname for yourself such as “notanewbie” and run the following commands:

irssi
/set nick notanewbie
/set autolog on
/connect irc.osx86.hu
/list
/join #iphone

Then just leave the terminal running or type “/quit” when you’re ready to exit. The IRC chat log will automatically be placed in ~/irclogs/osx86/#iphone.log . The chat log includes messages when people join/leave the channel, so you can use this command to peruse what people are actually saying:

cat \#iphone.log | egrep -v ‘has quit|has left|has joined’ | less

That should get you recording an IRC channel. For example, if you wanted to record the Webmaster Radio channel from webmasterradio.fm, you’d type “/connect irc.webmasterradio.fm” in the “/connect” line above, and then use “/join #webmasterradio” to join that channel and record it. So the commands would be:

irssi
/set nick notanewbie
/set autolog on
/connect irc.webmasterradio.fm
/list
/join #webmasterradio

If you join multiple channels, you can switch between them with -#, where # is a number like 0-9

{ 17 comments… read them below or add one }

CRI April 21, 2008 at 1:45 pm

Even better is to run the irssi inside screen program to be able to detach the irssi session and log off from console while irssi keeps on running.

sudo aptitude install screen

screen irssi

To detach: Ctrl+A D
To reattach: screen -r

Also irssi has ton of handy plugins, for example:
chanact.pl – select channels with Alt+[0-9]
defaultchanmode.pl – set channel mode on new channels
nicklist.pl – display list of users on a channel like mIRC
keepnick.pl – reclaims your nick automatically
trackbar.pl – draws a line each time you switch away from a window

Jeremy Zawodny April 21, 2008 at 2:32 pm

You Google guys… always wanting to archive everything.

What next? I suppose you’ll want to search it too! :-)

Matthew Anderson April 21, 2008 at 6:16 pm

Jeremy

There were Google bots crawling all over my IRC servers when I ran them around 4 years ago so i think they have already experimented in this : – ) Anything to say on that Matt?

Matt Cutts April 21, 2008 at 6:21 pm

Jeremy, when I think about all those iphone discussions on IRC flying into the ether, never to be seen or searchable again, well, a little tear comes to my eye. :)

But Matthew Anderson, I think that was an experiment and I’m certainly not personally aware of Google indexing IRC recently.

Harith April 21, 2008 at 11:59 pm

I see this thread need comments!

Ok. Here is one: Matt is iPhone freak :-)

purposeinc April 22, 2008 at 12:19 am

O.K. Since the comments are so slow I will speak up.

I wikipedia’d IRC, and I still don’t understand what it is.

Is it just the underlying technology behind what I think of as I.M.ing, or is it some other world where all the cool people chat with each other, and I have been left out of the loop?

But I still stand by my sworn statement for Matt to have freedom of expression, even when he discusses something that totally confuses me!

dk

Fran April 22, 2008 at 12:20 am

Irssi is just so lovely Zen.

First thing I did after installing Ubuntu was look for an IRC client, and I was like: ‘woah! a terminal IRC client, I need that!’

I still haven’t dropped my mail client for a terminal one, though. Sadly, you still need the point-click-select-delete to efficiently manage spam. Maybe many of us should switch to whitelists instead of blacklists, set a script and place a “send this subject to whitelist yourself” under our mail adress in our contact pages.

Errioxa April 22, 2008 at 3:38 am

Is this program better than pidgin?

Matthew Anderson April 22, 2008 at 5:56 am

Hi Matt

http://www.webmasterworld.com/forum3/18226.htm

From 2003, so around 4 years ago like I said before. We were all hot about it at the time thinking our privacy was about to be invaded but nothing ever came of it, just a little experimentation at the time I think.

HM2K April 22, 2008 at 6:20 am

I forgot to mention,

Linux tips 101, use grep properly instead of using cat

egrep -v ‘has quit|has left|has joined’ #iphone.log | less

And yes, less is more :)

Siddharth April 22, 2008 at 6:55 am

Ubuntu is impressive as it comes on a bootable CD as I have seen. The structure is simple and nice. Thanks for the tip.

Matt Cutts April 22, 2008 at 8:22 am

purposeinc, you’ve got it. You can chat/IM using tools like IRC. There’s also web-based chat with things like Meebo.

Matthew Anderson: ayup. :)

Errioxa, it depends on what you’re looking for. I wanted a simple way to record IRC channels, but most people probably care about ease-of-use more.

Siddharth, I think the newest version (Hardy Heron) of Ubuntu that comes out this week is going to be pretty sweet. :)

Ghosty April 22, 2008 at 9:11 am

Perfect timing. I just installed Ubuntu 7.10 on a spare HD (I’m teaching myself Linux) and was going to head into the IRC support channels to pose questions and get answers. This will come in most handy. :)

ApOgEE April 22, 2008 at 5:58 pm

Ubuntu is great!!. It have been my main operating system on my laptop and office’s workstation since the release of Gutsy. In fact, you can also use XChat to record them too. Just have to enable Scrollback and all conversation will be archived in your ~/.xchat2/scrollback/ folder.

Matt Cutts April 22, 2008 at 9:56 pm

Ghosty, glad I could help! Good tip, ApOgEE.

Matthew Anderson April 23, 2008 at 3:32 pm

I swear IRC used to be popular…

Dammit people. Does no one IRC anymore? ; – /

Tell me Matt, which servers to you idle on? :P

Esrun April 28, 2008 at 2:35 am

Ha Brilliant Matt!

I did something similar before but used the content for auto generating sites!

Leave a Comment

If you have a question about your site specifically or a general question about search, your best bet is to post in our Webmaster Help Forum linked from http://google.com/webmasters

If you comment, please use your personal name, not your business name. Business names can sound salesy or spammy, and I would like to try people leaving their actual name instead.

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: