summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;