summary refs log tree commit diff
diff options
context:
space:
mode:
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);