#!/usr/bin/perl # use strict; use warnings; use lib qw(./lib); use IRCNOW::Database; use IRCNOW::ParseLog::Znc; use IRCNOW::IO qw(:DEBUG); $verbosity=INFO; my $dbase='/var/www/botnow/botnow.db'; debug(INFO, "Loading Database $dbase"); my $botnowDB = IRCNOW::Database->new(dbpath=>$dbase); my $znclog = IRCNOW::ParseLog::Znc->new( database=>$botnowDB, zncLog=>'/home/znc/home/znc/.znc/moddata/adminlog/znc.log', ); use Data::Dumper; my $lastRecord=$znclog->dbLastRecord() || []; my $data = $znclog->parseLog($lastRecord->[1],$lastRecord->[3],$lastRecord->[4]); debug (WARNINGS, "znclog: New entries to insert: \n" . Dumper($data)); if (@$data) { $znclog->dbInsertRecord($data); } #print Dumper($znclog->parseLog($lastRecord->[1],$lastRecord->[3],$lastRecord->[4])); #$znclog->createTable();