diff options
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 (strncmp(tokens[2], ircdstate->ircnick, strlen(tokens[0])) == 0) { + if ((strlen(tokens[2]) == strlen(tokens[0])) && (strncmp(tokens[2], ircdstate->ircnick, strlen(tokens[0])) == 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; |