diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-05-28 01:32:15 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-05-28 04:59:20 +0200 |
commit | 61f15ead8a0d4582c2dfde48f3c0d8a3f66529d2 (patch) | |
tree | f6e96a95ecc417c5b717106c7190017398ce4164 /degesch.c | |
parent | 17f430043ac229e091e18670be826c2d448f0408 (diff) | |
download | xK-61f15ead8a0d4582c2dfde48f3c0d8a3f66529d2.tar.gz xK-61f15ead8a0d4582c2dfde48f3c0d8a3f66529d2.tar.xz xK-61f15ead8a0d4582c2dfde48f3c0d8a3f66529d2.zip |
degesch: don't CAP REQ when already registered
The list may later be requested manually, which shouldn't have
an unexpected side-effect.
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } |