/[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 5 by dpavlin, Mon Feb 27 12:10:07 2006 UTC revision 6 by dpavlin, Mon Feb 27 12:41:10 2006 UTC
# Line 41  my $DSN = 'DBI:Pg:dbname=irc-logger'; Line 41  my $DSN = 'DBI:Pg:dbname=irc-logger';
41    
42  use POE qw(Component::IRC Wheel::FollowTail);  use POE qw(Component::IRC Wheel::FollowTail);
43  use DBI;  use DBI;
44    use Encode qw/from_to/;
45    
46    
47  my $dbh = DBI->connect($DSN,"","", { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr;  my $dbh = DBI->connect($DSN,"","", { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr;
# Line 95  POE::Session->create Line 96  POE::Session->create
96            my $channel = $_[ARG1]->[0];            my $channel = $_[ARG1]->[0];
97            my $msg = $_[ARG2];            my $msg = $_[ARG2];
98    
99              from_to($msg, 'UTF-8', 'ISO-8859-2');
100    
101            print "$channel: <$nick> $msg\n";            print "$channel: <$nick> $msg\n";
102            $sth->execute($channel, $nick, $msg);            $sth->execute($channel, $nick, $msg);
103      },      },

Legend:
Removed from v.5  
changed lines
  Added in v.6

  ViewVC Help
Powered by ViewVC 1.1.26