--- trunk/irc-logger.pl 2006/06/25 16:37:39 36 +++ trunk/irc-logger.pl 2007/02/02 21:37:52 42 @@ -10,6 +10,14 @@ ./irc-logger.pl +=head2 Options + +=over 4 + +=item --import-dircproxy=filename + +Import log from C to C database + =head1 DESCRIPTION log all conversation on irc channel @@ -42,6 +50,8 @@ my $ENCODING = 'ISO-8859-2'; my $TIMESTAMP = '%Y-%m-%d %H:%M:%S'; +my $sleep_on_error = 5; + ## END CONFIG @@ -55,6 +65,13 @@ use HTML::TagCloud; use POSIX qw/strftime/; use HTML::CalendarMonthSimple; +use Getopt::Long; +use DateTime; + +my $import_dircproxy; +GetOptions( + 'import-dircproxy:s' => \$import_dircproxy, +); my $dbh = DBI->connect($DSN,"","", { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr; @@ -85,8 +102,8 @@ my $sth = $dbh->prepare(qq{ insert into log - (channel, me, nick, message) -values (?,?,?,?) + (channel, me, nick, message, time) +values (?,?,?,?,?) }); my $tags; @@ -111,6 +128,7 @@ } }, context => 5, + full_rows => 1, ); Order is important. Fields are first passed through C (if available) and @@ -118,6 +136,9 @@ C defines number of messages around each search hit for display. +C will return database rows for each result with C, C