shithub: moonfish

Download patch

ref: bc6f8f2d6bc0fe8f793d5ef1493d2c5d950cc4cc
parent: 85063283484141c185665c43007dedb6ad711ded
author: zamfofex <zamfofex@twdb.moe>
date: Mon Oct 9 18:25:16 EDT 2023

refuse blitz challenges too (for now)

--- a/tools/lichess.c
+++ b/tools/lichess.c
@@ -766,7 +766,7 @@
 		speed = cJSON_GetObjectItem(challenge, "speed");
 		if (!cJSON_IsString(speed)) moonfish_json_error(argv0);
 		
-		if (!strcmp(speed->valuestring, "bullet"))
+		if (!strcmp(speed->valuestring, "bullet") || !strcmp(speed->valuestring, "blitz"))
 		{
 			snprintf(line, sizeof line, "POST /api/challenge/%s/decline", id->valuestring);
 			if (moonfish_basic_request(argv0, name, port, token, line, "", "reason=tooFast"))
--