summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2022-01-03 16:52:44 +0000
committerLuke Bratch <luke@bratch.co.uk>2022-01-03 16:52:44 +0000
commitd9a27856ab4e3c365ff9755acc6a147c0ae0339d (patch)
tree70193d20990840b69c42fac08fd7ed5c5c8545a9
parent91c030f3831f79e41aa5718c4b543c242fa1b880 (diff)
Fix PRIVMSG logging going to the wrong log file.
-rw-r--r--logging.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/logging.c b/logging.c
index 769047a..a3eac5b 100644
--- a/logging.c
+++ b/logging.c
@@ -134,7 +134,7 @@ int logline(char *str, struct ircdstate *ircdstate, char *basedir, int type) {
// Build the log filename
// If the message was sent to us, then log it in the sender's log file
- if ((strlen(tokens[2]) == strlen(tokens[0])) && (strncmp(tokens[2], ircdstate->ircnick, strlen(tokens[0])) == 0)) {
+ if ((strlen(tokens[2]) == strlen(ircdstate->ircnick)) && (strncmp(tokens[2], ircdstate->ircnick, strlen(tokens[2])) == 0)) {
if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, from)) {
debugprint(DEBUG_CRIT, "Error while preparing log filename for from name, returning!\n");
return 0;