From 6737c2ec911afd4a62d2961432ea8c784885e641 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Wed, 21 Oct 2020 22:07:17 +0100 Subject: Correct detection of changed nick for updating existing clients when reconnecting to server after a timeout. --- TODO | 2 -- message.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/TODO b/TODO index 02cbdf0..d57b70c 100644 --- a/TODO +++ b/TODO @@ -32,5 +32,3 @@ arrindex() shouldn't return 0 on failure as 0 is a valid index. Instead return Make the "channels" configuration file entry an array. Crash when requesting 30 hour replay. - -Existing clients' own nicks are not updated if we decided the server timed out and reconnected before the server decided we were gone. diff --git a/message.c b/message.c index 2c6eb16..6ee959a 100644 --- a/message.c +++ b/message.c @@ -108,7 +108,7 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int // If this is a reconnection, JOIN existing channels and catch clients up again if (ircdstate->reconnecting) { // First tell clients if our nick changed - if (!strcmp(ircdstate->ircnick, ircdstate->oldnick)) { + if (strcmp(ircdstate->ircnick, ircdstate->oldnick)) { debugprint(DEBUG_SOME, "Telling clients about nick change.\n"); char nickmsg[MAXDATASIZE]; snprintf(nickmsg, MAXDATASIZE, ":%s NICK :%s", ircdstate->oldnick, ircdstate->ircnick); -- cgit v1.2.3