summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/server.c b/server.c
index 1741f14..e8c8880 100644
--- a/server.c
+++ b/server.c
@@ -165,8 +165,13 @@ void serverRecv(void) {
 		if (!crlf) break;
 		crlf[0] = '\0';
 		if (verbose) fprintf(stderr, "\x1B[32m%s\x1B[m\n", line);
-		if (!strncmp(line, "PING ", 5)) {
-			serverFormat("PONG %s\r\n", &line[5]);
+		const char *ping = line;
+		if (ping[0] == '@') {
+			ping += strcspn(ping, " ");
+			if (*ping) ping++;
+		}
+		if (!strncmp(ping, "PING ", 5)) {
+			serverFormat("PONG %s\r\n", &ping[5]);
 		} else {
 			if (stateReady()) ringProduce(line);
 			stateParse(line);
f6e19ce10c11cf7c6b85cd48a3a&follow=1'>List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe