--- trunk/irc-logger.pl 2006/10/24 12:51:49 41 +++ trunk/irc-logger.pl 2007/02/03 12:18:04 45 @@ -18,6 +18,12 @@ Import log from C to C database +=item --log=irc-logger.log + +Name of log file + +=back + =head1 DESCRIPTION log all conversation on irc channel @@ -67,12 +73,21 @@ use HTML::CalendarMonthSimple; use Getopt::Long; use DateTime; +use Data::Dump qw/dump/; my $import_dircproxy; +my $log_path; GetOptions( 'import-dircproxy:s' => \$import_dircproxy, + 'log:s' => \$log_path, ); +open(STDOUT, '>', $log_path) || warn "can't redirect log to $log_path: $!"; + +sub _log { + print strftime($TIMESTAMP,localtime()), ' ', join(" ",@_), $/; +} + my $dbh = DBI->connect($DSN,"","", { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr; eval { @@ -128,6 +143,7 @@ } }, context => 5, + full_rows => 1, ); Order is important. Fields are first passed through C (if available) and @@ -135,6 +151,9 @@ C defines number of messages around each search hit for display. +C will return database rows for each result with C, C