/[irc-logger]/trunk/bin/irc-logger.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/irc-logger.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by dpavlin, Sun Mar 18 16:03:24 2007 UTC revision 53 by dpavlin, Sun Mar 18 17:00:16 2007 UTC
# Line 74  use HTML::CalendarMonthSimple; Line 74  use HTML::CalendarMonthSimple;
74  use Getopt::Long;  use Getopt::Long;
75  use DateTime;  use DateTime;
76  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
77    use Net::Twitter;
78    
79  my $import_dircproxy;  my $import_dircproxy;
80  my $log_path;  my $log_path;
# Line 545  POE::Session->create( inline_states => Line 546  POE::Session->create( inline_states =>
546    
547                  save_message( channel => $channel, me => 1, nick => $nick, msg => $msg);                  save_message( channel => $channel, me => 1, nick => $nick, msg => $msg);
548    
549                  if ( my $twitter = ( $nick, $channel, 'twitter' ) ) {                  if ( my $twitter = meta( $nick, $channel, 'twitter' ) ) {
550                          _log("FIXME: send twitter for $nick on $channel [$twitter]");                          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");
554                  }                  }
555    
556      },      },
# Line 673  POE::Session->create( inline_states => Line 677  POE::Session->create( inline_states =>
677                          if ( ! defined( $1 ) ) {                          if ( ! defined( $1 ) ) {
678                                  my $sth = $dbh->prepare(qq{ select name,value,changed from meta where nick = ? and channel = ? });                                  my $sth = $dbh->prepare(qq{ select name,value,changed from meta where nick = ? and channel = ? });
679                                  $sth->execute( $nick, $channel );                                  $sth->execute( $nick, $channel );
680                                  $res = "config for $nick ";                                  $res = "config for $nick on $channel";
681                                  while ( my ($n,$v) = $sth->fetchrow_array ) {                                  while ( my ($n,$v) = $sth->fetchrow_array ) {
682                                          $res .= "| $n = $v";                                          $res .= " | $n = $v";
683                                  }                                  }
684                          } elsif ( ! $2 ) {                          } elsif ( ! $2 ) {
685                                  my $val = meta( $nick, $channel, $1 );                                  my $val = meta( $nick, $channel, $1 );

Legend:
Removed from v.51  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.26