From 979b594b9a58059a5159f2a950e0a71c64f35e38 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sat, 7 Sep 2019 15:31:01 +0100 Subject: Avoid non-existent users appearing in channels after they change nicks by replay logging nick changes. --- logging.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'logging.c') diff --git a/logging.c b/logging.c index e7a20ea..d661a2b 100644 --- a/logging.c +++ b/logging.c @@ -37,8 +37,8 @@ // If LOG_TOPIC then it expects a string in the format: // :nick!bar@baz TOPIC #channel :bla bla bla // -// With the ":foo!bar@baz "prefix being important for either -// type. +// With the ":foo!bar@baz "prefix being important for all +// types. // // Returns 1 on success or 0 on failure. int logline(char *str, char *ournick, char *basedir, int type) { @@ -106,13 +106,13 @@ int logline(char *str, char *ournick, char *basedir, int type) { // If the message was sent to us, then log it in the sender's log file if (strncmp(tokens[2], ournick, strlen(tokens[0])) == 0) { if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, from)) { - debugprint(DEBUG_CRIT, "Error while log filename for from name, returning!\n"); + debugprint(DEBUG_CRIT, "Error while preparing log filename for from name, returning!\n"); return 0; } } else { // Otherwise log it in the "to" log file if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, to)) { - debugprint(DEBUG_CRIT, "Error while log filename for to name, returning!\n"); + debugprint(DEBUG_CRIT, "Error while preparing log filename for to name, returning!\n"); return 0; } } @@ -187,7 +187,7 @@ int logline(char *str, char *ournick, char *basedir, int type) { stripprefix(str); if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, to)) { - debugprint(DEBUG_CRIT, "Error while log filename for topic, returning!\n"); + debugprint(DEBUG_CRIT, "Error while preparing log filename for topic, returning!\n"); return 0; } @@ -199,7 +199,7 @@ int logline(char *str, char *ournick, char *basedir, int type) { break; default : - printf("Unknown log type '%d', returning 0.\n", type); + debugprint(DEBUG_CRIT, "logline(): Unknown log type '%d', returning 0.\n", type); return 0; } -- cgit v1.2.3