diff options
author | Luke Bratch <luke@bratch.co.uk> | 2022-01-03 16:52:44 +0000 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2022-01-03 16:52:44 +0000 |
commit | d9a27856ab4e3c365ff9755acc6a147c0ae0339d (patch) | |
tree | 70193d20990840b69c42fac08fd7ed5c5c8545a9 /logging.c | |
parent | 91c030f3831f79e41aa5718c4b543c242fa1b880 (diff) |
Fix PRIVMSG logging going to the wrong log file.
Diffstat (limited to 'logging.c')
-rw-r--r-- | logging.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |