diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-09-07 15:31:01 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-09-07 15:31:01 +0100 |
commit | 979b594b9a58059a5159f2a950e0a71c64f35e38 (patch) | |
tree | e395e679d08bb963d75a388fa723942b967cd1c3 /logging.c | |
parent | c4e88bfe0c918604cb588ab8b3ce7d29b138cd0f (diff) |
Avoid non-existent users appearing in channels after they change nicks by replay logging nick changes.
Diffstat (limited to 'logging.c')
-rw-r--r-- | logging.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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; } |