shithub: moonfish

Download patch

ref: eb679565530a6f4030377ec73a85edd92d2f6783
parent: e020be111c634b4d2cc5e13178feae9527171be4
author: zamfofex <zamfofex@twdb.moe>
date: Fri Oct 13 14:01:18 EDT 2023

also accept bullet and blitz challenges on Lichess

--- a/tools/lichess.c
+++ b/tools/lichess.c
@@ -768,14 +768,6 @@
 		speed = cJSON_GetObjectItem(challenge, "speed");
 		if (!cJSON_IsString(speed)) moonfish_json_error(argv0);
 		
-		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"))
-				fprintf(stderr, "%s: could not decline challenge '%s' (too fast)\n", argv0, id->valuestring);
-			continue;
-		}
-		
 		if (!strcmp(speed->valuestring, "correspondence"))
 		{
 			snprintf(line, sizeof line, "POST /api/challenge/%s/decline", id->valuestring);
--