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; |
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 |
}, |
}, |
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 ); |