From 708988213f04875f470d96ecaa87ed8c53fee394 Mon Sep 17 00:00:00 2001 From: Michael Forsman Date: Wed, 23 Oct 2019 10:13:55 -0500 Subject: [PATCH] Adjusted Terraria protocol to check the "status" property for string "200" rather than integer 200. I am not sure if the TShock API changed this recently or what, but it returns a string in the current version (4.3.26 for Terraria 1.3.5.3), and comparing it to an integer was incorrectly causing an "Invalid status" error. --- protocols/terraria.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/terraria.js b/protocols/terraria.js index 688194d..8daf47e 100644 --- a/protocols/terraria.js +++ b/protocols/terraria.js @@ -11,7 +11,7 @@ class Terraria extends Core { }); const json = JSON.parse(body); - if(json.status !== 200) throw new Error('Invalid status'); + if(json.status !== '200') throw new Error('Invalid status'); for (const one of json.players) { state.players.push({name:one.nickname,team:one.team});