From 549c84c6efa725b2c46bb58ac01d0fd959953a6f Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Wed, 20 Sep 2023 20:06:24 +0200 Subject: [PATCH] Logger: Fix some mistakes --- logger.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/logger.pm b/logger.pm index 1c39ddf..bc8f8f0 100644 --- a/logger.pm +++ b/logger.pm @@ -333,8 +333,8 @@ sub handleNick { if(!$found || !prepareLogFile($aLogFiles, $aServerName, $channel)) { next; } - $aLogFiles->{$aCommand->[1]}{"file"}->print(sprintf("(%s) %s is now known as %s\n", localtime->strftime("%H:%M:%S"), $username, $aCommand->[1])); - $aLogFiles->{$aCommand->[1]}{"file"}->flush(); + $aLogFiles->{$channel}{"file"}->print(sprintf("(%s) %s is now known as %s\n", localtime->strftime("%H:%M:%S"), $username, $aCommand->[1])); + $aLogFiles->{$channel}{"file"}->flush(); } } @@ -484,10 +484,10 @@ while(my @row = $query->fetchrow_array()) { my $host = $row[2]; my $port = $row[3]; - $query = $db->prepare(qq(select name from channels where server_id=$id;)); - $query->execute(); + my $channelQuery = $db->prepare(qq(select name from channels where server_id=$id;)); + $channelQuery->execute(); my @channels; - while(my @channelsRow = $query->fetchrow_array()) { + while(my @channelsRow = $channelQuery->fetchrow_array()) { my $name = $channelsRow[0]; push(@channels, $name); }