diff options
author | June McEnroe <june@causal.agency> | 2020-02-06 03:44:49 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-06 03:44:49 -0500 |
commit | 1e6e533538f5c18adc64f21155cb76277dcb2a9b (patch) | |
tree | 89959898564df8e0e3240c21ae0b5edf3decfd56 | |
parent | Flesh out trailing manual sections (diff) | |
download | catgirl-1e6e533538f5c18adc64f21155cb76277dcb2a9b.tar.gz catgirl-1e6e533538f5c18adc64f21155cb76277dcb2a9b.zip |
Send CAP END if CAP LS doesn't list anything good
Diffstat (limited to '')
-rw-r--r-- | handle.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/handle.c b/handle.c index e636434..cb080e9 100644 --- a/handle.c +++ b/handle.c @@ -98,7 +98,11 @@ static void handleCap(struct Message *msg) { enum Cap caps = capParse(msg->params[2]); if (!strcmp(msg->params[1], "LS")) { caps &= ~CapSASL; - ircFormat("CAP REQ :%s\r\n", capList(caps)); + if (caps) { + ircFormat("CAP REQ :%s\r\n", capList(caps)); + } else { + if (!(self.caps & CapSASL)) ircFormat("CAP END\r\n"); + } } else if (!strcmp(msg->params[1], "ACK")) { self.caps |= caps; if (caps & CapSASL) { |