Make XMLLogger work again (fallout from the time patch a while back)

This commit is contained in:
ian%hixie.ch 2004-01-27 01:29:18 +00:00
parent cb26702f03
commit 14075125c3

View File

@ -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</$messageType>\n";