From 14075125c348363675576c2e7c98c5d7acd932fd Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Tue, 27 Jan 2004 01:29:18 +0000 Subject: [PATCH] Make XMLLogger work again (fallout from the time patch a while back) --- webtools/mozbot/BotModules/XMLLogger.bm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webtools/mozbot/BotModules/XMLLogger.bm b/webtools/mozbot/BotModules/XMLLogger.bm index 00ff55c4961f..9e81e06ee2ce 100644 --- a/webtools/mozbot/BotModules/XMLLogger.bm +++ b/webtools/mozbot/BotModules/XMLLogger.bm @@ -94,7 +94,8 @@ sub DoLog { # wohay, we have a candidate! # now check for possible blockers... unless ($self->isBlocked($event)) { - $self->WriteMessage($event->{'channel'}, + $self->WriteMessage($event->{'time'}, + $event->{'channel'}, $event->{'from'}, $event->{'fulldata'}, $messageType); @@ -119,12 +120,12 @@ sub isBlocked { sub WriteMessage { my $self = shift; - my ($channel, $from, $message, $messageType) = @_; + my ($time, $channel, $from, $message, $messageType) = @_; # Open the log file and append the message $channel = $self->sanitiseChannelName($channel); my $logName = $self->getLogFilename("$channel.xml.part"); if (open(LOG, ">>$logName")) { - my $msgtime = $self->logdate($event->{'time'}); + my $msgtime = $self->logdate($time); # sanitise the output $_ = $self->escapeXML($_) for ($messageType, $channel, $from, $msgtime, $message); print LOG "<$messageType channel=\"$channel\" nick=\"$from\" time=\"$msgtime\">$message\n";