degesch: don't CAP REQ when already registered

The list may later be requested manually, which shouldn't have
an unexpected side-effect.
This commit is contained in:
Přemysl Eric Janouch 2021-05-28 01:32:15 +02:00
parent 17f430043a
commit 61f15ead8a
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -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);
}