--- trunk/bin/irc-logger.pl 2007/03/18 16:03:24 51 +++ trunk/bin/irc-logger.pl 2007/03/18 17:00:16 53 @@ -74,6 +74,7 @@ use Getopt::Long; use DateTime; use Data::Dump qw/dump/; +use Net::Twitter; my $import_dircproxy; my $log_path; @@ -545,8 +546,11 @@ save_message( channel => $channel, me => 1, nick => $nick, msg => $msg); - if ( my $twitter = ( $nick, $channel, 'twitter' ) ) { - _log("FIXME: send twitter for $nick on $channel [$twitter]"); + if ( my $twitter = meta( $nick, $channel, 'twitter' ) ) { + my ($login,$passwd) = split(/\s+/,$twitter,2); + _log("sending twitter for $nick/$login on $channel "); + my $bot = Net::Twitter->new( username=>$login, password=>$passwd ); + $bot->update("<${channel}> $msg"); } }, @@ -673,9 +677,9 @@ if ( ! defined( $1 ) ) { my $sth = $dbh->prepare(qq{ select name,value,changed from meta where nick = ? and channel = ? }); $sth->execute( $nick, $channel ); - $res = "config for $nick "; + $res = "config for $nick on $channel"; while ( my ($n,$v) = $sth->fetchrow_array ) { - $res .= "| $n = $v"; + $res .= " | $n = $v"; } } elsif ( ! $2 ) { my $val = meta( $nick, $channel, $1 );