summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-09-15 20:21:36 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-09-15 20:21:36 +0100
commitcbaaaf96ed8217933429e1e7bec93db35040ae99 (patch)
tree5b4f0b9c99a9c14d1678e766251ccd4fbfd9abce /message.c
parentc600744e8b569efe4e38a4c4f617e0a246c4e745 (diff)
Remove nicks from channels when reconnecting, before re-JOINing them.
Diffstat (limited to 'message.c')
-rw-r--r--message.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/message.c b/message.c
index 6b88871..e7139bc 100644
--- a/message.c
+++ b/message.c
@@ -127,6 +127,11 @@ int processservermessage(SSL *server_ssl, char *str, struct client *clients, int
continue;
}
+ // Remove nicks in the channel, we will re-get them when re-JOINing
+ for (int j = 0; j < MAXCHANNICKS; j++) {
+ channels[i].nicks[j][0] = '\0';
+ }
+
debugprint(DEBUG_SOME, "Reconnection: Re-joining '%s'.\n", channels[i].name);
char joinmsg[MAXDATASIZE];