summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-24 01:35:59 -0400
committerJune McEnroe <june@causal.agency>2019-10-24 01:35:59 -0400
commit4fc24014987028ff2a6ad8b58adf1b17809be419 (patch)
tree9790e2e409651781d30969518752e18f66ed6de1
parentSet client-side origin to irc.invalid (diff)
downloadpounce-4fc24014987028ff2a6ad8b58adf1b17809be419.tar.gz
pounce-4fc24014987028ff2a6ad8b58adf1b17809be419.zip
Only set NeedCapEnd if unregistered
Diffstat (limited to '')
-rw-r--r--client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/client.c b/client.c
index 9e0d2bc..6bbfdb5 100644
--- a/client.c
+++ b/client.c
@@ -139,11 +139,11 @@ static void handleCap(struct Client *client, struct Message msg) {
 		}
 
 	} else if (!strcmp(msg.params[0], "LS")) {
-		client->need |= NeedCapEnd;
+		if (client->need) client->need |= NeedCapEnd;
 		clientFormat(client, ":%s CAP * LS :server-time\r\n", Origin);
 
 	} else if (!strcmp(msg.params[0], "REQ") && msg.params[1]) {
-		client->need |= NeedCapEnd;
+		if (client->need) client->need |= NeedCapEnd;
 		if (!strcmp(msg.params[1], "server-time")) {
 			client->serverTime = true;
 			clientFormat(client, ":%s CAP * ACK :server-time\r\n", Origin);