summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2026-04-03 15:49:00 +0200
committerLuke Bratch <luke@bratch.co.uk>2026-04-03 15:49:00 +0200
commit52709612ed54418a5f8e59e74d71fde0bcbcb4bc (patch)
tree60ab7e8cf1091f696a11fdee3cc083608b560480
parent6404663b4588d606adfc06dbceeca24a4c748122 (diff)
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).HEADmaster
-rw-r--r--message.c3
1 files changed, 3 insertions, 0 deletions
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