From d9a27856ab4e3c365ff9755acc6a147c0ae0339d Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Mon, 3 Jan 2022 16:52:44 +0000 Subject: Fix PRIVMSG logging going to the wrong log file. --- logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'logging.c') 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; -- cgit v1.2.3