Revision 53

Date:
2007/03/18 17:00:16
Author:
dpavlin
Revision Log:
implement twitter using Net::Twitter -- use
/msg irc-logger conf twitter <twitter_login> <twitter_password>
to turn auto-update of twitter every time you use /me in channel which
is monitored by irc-logger
Files:

Legend:

 
Added
 
Removed
 
Modified
  • trunk/bin/irc-logger.pl

     
    74 74 use Getopt::Long;
    75 75 use DateTime;
    76 76 use Data::Dump qw/dump/;
    77 use Net::Twitter;
    77 78
    78 79 my $import_dircproxy;
    79 80 my $log_path;
     
    545 546
    546 547 save_message( channel => $channel, me => 1, nick => $nick, msg => $msg);
    547 548
    548 if ( my $twitter = ( $nick, $channel, 'twitter' ) ) {
    549 _log("FIXME: send twitter for $nick on $channel [$twitter]");
    549 if ( my $twitter = meta( $nick, $channel, 'twitter' ) ) {
    550 my ($login,$passwd) = split(/\s+/,$twitter,2);
    551 _log("sending twitter for $nick/$login on $channel ");
    552 my $bot = Net::Twitter->new( username=>$login, password=>$passwd );
    553 $bot->update("<${channel}> $msg");
    550 554 }
    551 555
    552 556 },