IRC notifications

I currently use IRSSI, a traditional text-based client for IRC. I’ve used various GUI clients in the past, but found them all to have bugs and quirks that drove me crazy. IRSSI’s been very good to me, but it’s lacking one major feature that every GUI client has — notifications. And so unless I actually *look* at my IRC terminal, I can’t tell if someone’s trying to get my attention. To make things even worse, I run IRSSI under screen on a Mozilla server (so it’s always online even if my laptop isn’t). That makes it tricky to get a notification on my local system when the trigger is on a remote system.

Back in 2010 Justin Dow blogged about one way to get this working. It’s a little complicated… You first configure IRSSI to log notifications to a text file, the run one normal interactive SSH connection to screen+IRSSI, and another SSH connection to pipe the IRSSI log back to a local script that feeds it into Growl. I didn’t want to do that.

I tried using iTerm 2 for a while. Among its many bells and whistles is the ability to do actions (like notifications) upon a regex match. Neat little feature, and was easy to get working for someone saying “dolske” in whatever channel I had active. But background mentions don’t send any obvious string, so that was a huge limitation. (I tried regexing for the ANSI control codes that hilight an IRSSI window number, but that didn’t work reliably.)

I recently read that as of OS X 10.7, the default Terminal.app includes a simple feature — whenever it receives a bell character, it will bounce the Dock icon and annotate the icon with a number. Perfect! I got this all working, so here’s what you can do:

1. Configure Terminal.app. Actually, you don’t need to. This works automatically. But Preferences –> Settings –> Advanced –> Audible Bell may be something you want to disable if you dislike terminals making noise. Or enable it for debugging this.

2. Configure IRSSI to beep on private messages and hilights: /set beep_msg_level MSGS HILIGHT

3. Configure Screen to allow passing through beeps. You can put “vbell off” in ~/.screenrc and/or toggle it interactively via Control-A, Control-G. An easy test for this is to enable Audible Bell (see step 1) and use IRSSI’s /beep command. If you hear a sound, you’re good to go.

Note that IRSSI also has a “/set bell_beeps on|off” toggle. It’s not needed for the above; it seems to be for filtering out bell characters from channel messages, but the docs are somewhat vague (and a quick skim of the source wasn’t any more enlightening).

About Justin Dolske

Mostly harmless.
This entry was posted in PlanetMozilla. Bookmark the permalink.

3 Responses to IRC notifications

  1. glandium says:

    Sadly, highlights don’t work very well: there are pleny of cases where “glandium” is mentioned without irssi notifying for it. Even weirder, sometimes I get notifications for nothing.

  2. Strange, I’ve never had irssi mis-notify for me.

  3. Patrick Cloke says:

    I’ve used various GUI clients in the past, but found them all to have bugs and quirks that drove me crazy.

    It sounds like you really DO want a GUI client though if you want it to interact with the Mac Dock. A better solution might be to use a bouncer (ZNC, most likely, I think Mozilla runs an instance?) and a GUI client: I’d suggest Instantbird (http://www.instantbird.com/). Don’t dismiss it because it’s a multi-protocol instant messaging client; we’ve put a lot of work into making it into a great IRC program and continue to tweak things that we find “get in our way” during our daily IRC usage.

    I’d be really interesting in knowing of any bugs or quirks that drive you crazy if you give it a try! Stop by #instantbird on irc.mozilla.org and let me/us know (my nick is clokep). And luckily, if you do have issues, the source should be enlightening and fairly readable for you, since it’s a Mozilla toolkit based product. :)

    (Full disclaimer: I’m one of the main developers of Instantbird and wrote the IRC code used in that and Thunderbird.)

Comments are closed.