Skip to content

Instantly share code, notes, and snippets.

@bryanwoods
Created August 30, 2012 21:39
Show Gist options
  • Save bryanwoods/3541836 to your computer and use it in GitHub Desktop.
Save bryanwoods/3541836 to your computer and use it in GitHub Desktop.
Perl script to send mentions of my name in IRC to Notification Center or whatever it's called
use strict;
use warnings;
use Irssi;
Irssi::signal_add 'message public', 'sig_message_public';
sub sig_message_public {
my ($server, $msg, $nick, $nick_addr, $target) = @_;
if ($msg =~ /ryan/) {
$msg =~ s/\'/\\'/g;
`terminal-notifier -message '$msg';`;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment