Hacking Prowl and Irssi

The moment I stumbled upon Prowl (a new iPhone App that routes Growl notifications to your iPhone via Apple’s push service) I knew I would find some powerful uses for it.

At Tera-Byte, several of my colleagues telecommute. In order to stay in constant communication with each other, we all use good ol’ IRC. In order to be readily available and allow quick roaming from one location to an other, I use Irssi‘s proxy module which runs continuously within a screen session on my co-located server.

On my Desktops and iPhone I run Colloquy which connects to my Irssi proxy. Although push capabilities are planned for Colloquy, it’s not ready yet. Prowl appeared to be the perfect band-aid for the situation.

My original plan was to use Prowl as intended and have Colloquy’s Growl notifications directed to my iPhone. This had some limitations, most importantly it required leaving Colloquy running on my work desktop.

Fortunately the developer of Prowl provided an example perl script to push notifications to Prowl independently of Growl. I’ve never attempted to work with Irssi script’s, but it appeared I had all the required pieces to build something clever.

I downloaded BCOW’s awayproxy.pl script as a starting point and began to hack away at it. The result: prowlnotify.pl.

Change the prowluser and prowlpass lines then load this script into Irssi. While you’re connected to your proxy the script will do nothing. When your last IRC client disconnects it will push all subsequent public messages containing your nick as well as private messages to your iPhone via Prowl. How sweet it is!

Of course, this post would not be complete without an obligatory screenshot. Nobody appeared to have anything to say today, so I was down and out. In my desperation I called upon cshaiku to grace me with his words of wisdom:

Update: I have now updated this script to use the new Prowl apikeys. Editing the script is no longer required. Simply copy your Prowl key into ~/.prowlkey.


Another update: Every time I try to search Google for an Irssi plugin to work with Colloquy’s push notification feature instead of using Prowl I find my own page. Amusing, but not helpful!

Just found a Colloquy push script for Irssi written by Nicolas Pouillon that does exactly that.

19 Responses to “Hacking Prowl and Irssi”

  1. cs Says:

    Seriously? You had to tell the world about our little secret!?

    I’m taking the kids. You can have the duckie. He always loved you anyways.

    *sniff*

    😛

  2. Jason Says:

    Just wanted to drop you two lines:

    (1) Thank you for this script. Just testing it out not 5 minutes ago and worked like a charm.

    Using this script and screen_away, I have a perfect combination of notification.

    (2) This has inspired me to find other ways to use Prowl, and I’ve already whipped up a NAGIOS event notification via Prowl script, and have already put it to use at work.

    Thanks for the script, thanks for the inspiration.

  3. blahdoo Says:

    Thanks for the script 🙂 Interesting use of the irssi proxy, I just SSH into my machine from whatever computer instead.

  4. How to: Get iPhone Push Notifications for (just about) Anything | JB's Personal Portfolio Says:

    […] IRC fans can also find some useful Prowl hacks here. […]

  5. Abyssar Says:

    Works like a Charm.. thanks! 🙂

  6. Nitrok Says:

    Well this didn’t work for me…
    I generated API key, pasted it into the .prowlkey and loaded the script in the irssi.
    Then i closed my irc-client and my friend tried sent me couple of private messages but i got no new notifications on my iphone.
    Is there log or something where i could check what is going wrong?

  7. My Favorite Irssi Scripts | chrisjohnston.org Says:

    […] prowlnotify.pl – This script is cool for those who have an iPhone. When your connection is set to away, either by /away or by disconnecting from screen (using the next script), Prowl Notify will use APIs to send your message to your iPhone. It is quite cool if you have an iPhone like I do. […]

  8. Brandon Says:

    Hmm. This script seems to cause irssi to seg fault whenever my nick is hilighted. D’oh.

  9. Chris Says:

    This is really great – worked like a charm. Thanks so much for publishing the script!

    Chris

  10. Luke Says:

    Hi,

    This looks great, however I get the following;

    15:38 -!- Irssi: From Irssi::Script::prowlnotify:
    15:38 -!- Irssi: Sending prowl
    15:38 -!- Irssi: From Irssi::Script::prowlnotify:
    15:38 -!- Irssi: Notification not posted: 500 Can’t locate object method “new” via package “LWP::Protocol::https::Socket”

    Even though I have the packages installed.

    Any ideas?

  11. brabax Says:

    Luke: if you’re using Debian or Ubuntu, try to install libcrypt-ssleay-perl and libcrypt-ssleay-perl, restart irssi and try again. Worked for me.

  12. err... Says:

    I use debian, and, i having probl;ems with irc and perl altogether, so when i saw this, i kinda saw some glimmer of hope 😛 but, i realised it has same name 2 times??? I assume a type but, could you please provide with the correct libs needed exactly? not just the one i see there.. btw: installing xchat and eggdrop adds some of the modules for irc but… with perl, i am experiencing problems running even a simple irc tailbot :s so am hoping this ;
    libcrypt-ssleay-perl and libcrypt-ssleay-perl
    is somehow a type and, it means there is one packge or, just type ?? am surprised no deb users have spoken up yet…but anyhow! thanks!

  13. Bryan Says:

    I used cpan to install Crypt::SSLeay and openssl-devel and then put “use Crypt::SSLeay;” near the top and it worked for me

  14. m3lvin Says:

    Thanks for this script, it’s working well for me but there is one thing that bugs me, I’m using this together with autoaway.pl and when the script runs it causes autoaway to return me to online state and reset the away counter. I’ve asked around #irssi about this and they suggest I merge the two scripts. I’m not sure if the problem could be solved in prowlnotify.pl or autoaway.pl without merging them as I’m not familiar with perl. Has anyone else ran into this issue and maybe found a solution? I’ll post back if I manage solve it.

  15. C Says:

    @m3lvin

    I was googling around for a script like this, found this, but it didn’t play well with autaway.pl. While looking around I found a fork of this script, however, it’s focusing on the use of autoaway.pl instead of awayproxy.pl. Works like a charm for me.

    http://sniker.codebase.nu/post/14#Prowl.pl

  16. Adriano Says:

    Hi, I recently release a prowl-like application for the Android. I am contacting you to ask if you have any interest on adding Android support on your application. Please contact me if you do and I could be of any help. Thank you.

  17. Configuring irssi with iPhone and Prowl « QA Toolbox Says:

    […] away and forwards them to my iPhone using Prowl. For this I use a ready made and excellent script (prowlnotify.pl) written by Denis […]

  18. RH Says:

    Hi,

    Just wanted to say thanks for the script. Have been using it for some time now. Instead of using it with autoaway though, I use it in conjunction with another script which uses my phone to detect whether I’m at my desk or not:

    http://qatoolbox.wordpress.com/2011/05/25/configuring-irssi-with-iphone-and-prowl/

    Cheers!

  19. New prowlnotify.pl script « It All Started in '89 Says:

    […] on my old desktop for use as an IRC proxy. The wonderful part was finding Denis Lemire’s prowlnotify.pl script, which sends push notifications to my iPhone via Prowl, an iPhone app that accepts grow […]

Leave a Reply