From 61f15ead8a0d4582c2dfde48f3c0d8a3f66529d2 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Fri, 28 May 2021 01:32:15 +0200 Subject: degesch: don't CAP REQ when already registered The list may later be requested manually, which shouldn't have an unexpected side-effect. --- degesch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/degesch.c b/degesch.c index 8b0269b..563da0f 100644 --- a/degesch.c +++ b/degesch.c @@ -6570,7 +6570,9 @@ irc_process_cap_ls (struct server *s) // XXX: with IRCv3.2, this may end up being too long for one message, // and we need to be careful with CAP END. One probably has to count // the number of sent CAP REQ vs the number of received CAP ACK/NAK. - irc_send (s, "CAP REQ :%s", chosen_str); + if (s->state == IRC_CONNECTED) + irc_send (s, "CAP REQ :%s", chosen_str); + free (chosen_str); } -- cgit v1.2.3-70-g09d2