mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-17 17:25:19 +01:00
Merge pull request #145 from ms4sman/ms4sman-terraria-fix
Adjusted Terraria protocol to check the "status" property for string …
This commit is contained in:
commit
68e115a64f
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ class Terraria extends Core {
|
||||||
});
|
});
|
||||||
|
|
||||||
const json = JSON.parse(body);
|
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) {
|
for (const one of json.players) {
|
||||||
state.players.push({name:one.nickname,team:one.team});
|
state.players.push({name:one.nickname,team:one.team});
|
||||||
|
|
Loading…
Reference in a new issue