From 52709612ed54418a5f8e59e74d71fde0bcbcb4bc Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Fri, 3 Apr 2026 15:49:00 +0200 Subject: Remove channels from the local channel array when reconnecting to avoid client de-sync issues if we can't successfully rejoin a channel (for instance if it is +R and we aren't registered yet). --- message.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/message.c b/message.c index f580419..695b196 100644 --- a/message.c +++ b/message.c @@ -142,6 +142,9 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int char joinmsg[MAXDATASIZE]; snprintf(joinmsg, MAXDATASIZE, "JOIN %s", channels[i].name); sendtoserver(server_ssl, joinmsg, strlen(joinmsg), 0, clients, settings); + + // And remove the channel locally (it will be recreated later if we get a JOIN back from the server) + removechannel(channels, ircdstate->maxchannelcount, channels[i].name); } // Finally do a replay for all clients and tell them we're reconnected -- cgit v1.3