Created
May 27, 2010 03:42
-
-
Save taiyoh/415423 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Glib; | |
use Irssi; | |
use Config::Pit; | |
use WebService::ImKayac; | |
my $im = WebService::ImKayac->new( | |
type => 'secret', | |
%{ pit_get('im.kayac') } | |
); | |
our $VERSION = '0.1.1'; | |
our %IRSSI = ( | |
name => 'hilight2im', | |
description => 'notify hilight message to IM via im.kayac.com api, @ttaiyoh modified', | |
authors => 'Daisuke Murase', | |
); | |
sub sig_printtext { | |
my ($dest, $text, $stripped) = @_; | |
if ( $dest->{level} & MSGLEVEL_HILIGHT ) { | |
$im->send(sprintf('[irssi] %s %s', $dest->{target}, $stripped)); | |
} | |
} | |
Irssi::signal_add('print text' => \&sig_printtext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment