From bce997b49790923b6e402470ee620b5ab7cbc526 Mon Sep 17 00:00:00 2001 From: harryob Date: Tue, 19 Sep 2023 17:56:45 +0100 Subject: [PATCH 1/2] Update world.dm --- code/game/world.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/world.dm b/code/game/world.dm index cff799800a49..bcbd4f7301ee 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -185,7 +185,7 @@ var/world_topic_spam_protect_time = world.timeofday if(logging) log_topic("(NON-JSON) \"[topic_decoded]\", from:[addr], master:[master], key:[key]") // Fallback check for spacestation13.com requests - if(topic_decoded == "ping") + if(topic_decoded == "status") return length(GLOB.clients) response["statuscode"] = 400 response["response"] = "Bad Request - Invalid JSON format" From 6128d7538830ae408af838a1b7c2d50244177e0b Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Tue, 19 Sep 2023 19:23:32 +0100 Subject: [PATCH 2/2] perhaps this --- code/game/world.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/world.dm b/code/game/world.dm index bcbd4f7301ee..fce40ca468ae 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -186,7 +186,7 @@ var/world_topic_spam_protect_time = world.timeofday log_topic("(NON-JSON) \"[topic_decoded]\", from:[addr], master:[master], key:[key]") // Fallback check for spacestation13.com requests if(topic_decoded == "status") - return length(GLOB.clients) + return list2params(list("players" = length(GLOB.clients))) response["statuscode"] = 400 response["response"] = "Bad Request - Invalid JSON format" return json_encode(response)