Friday, June 20, 2008

irssi notifications over Jabber (or IRC barking)

Thanks to daubers (the brains behind the XMPP doorbell) who suggested it, I now have irssi highlights sent directly to my Jabber client. Quite a handy thing since only yesterday I logged in to find several PMs awaiting me from 4 days ago.

For the base I used an existing irssi script called fnotify, which was designed to write notifications to a file. I found this script from Aaron Toponce's blog post.

mkdir -p ~/.irssi/scripts/autorun
cd ~/.irssi/scripts
wget -O
chmod +x
ln -s ../ autorun/

Change line 56 (which reads something like open(FILE, ...)) to:

open(FILE,"| sendxmpp -i me\");

Replace the JID with your own, and make sure to put a \backslash before the @ sign as above.

sudo apt-get install sendxmpp

When it is installed, tell sendxmpp what account to use for sending messages:

echo verysecret123 > ~/.sendxmpprc
chmod 0600 ~/.sendxmpprc

Replace with your JID and password of course ;)

Now, in irssi:

/win 1

(switching to window 1 is necessary to see any error messages if they appear)

If it loads successfully, get someone to say your nick or send you a private message. It should appear in your Jabber client within a few seconds.

A consequence of this for me is that IRC now barks too :)


Paul-Sebastian said...

So your cyberdog must be barking a lot now... Too bad it can only bark "monotone" :D -- could become annoying.

Anonymous said...

Why not just use Irssi for IRC and Jabber, just use irssi-xmpp plugin.