mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Reduced chance of protocol collisions between gamespy3 and minecraftbedrock (2.0.27)
This commit is contained in:
parent
883700d7dd
commit
052736edd7
6 changed files with 41 additions and 21 deletions
|
|
@ -81,7 +81,8 @@ class Minecraft extends Core {
|
|||
if (gamespyState) {
|
||||
if (gamespyState.name) state.name = gamespyState.name;
|
||||
if (gamespyState.maxplayers) state.maxplayers = gamespyState.maxplayers;
|
||||
if (gamespyState.players) state.players = gamespyState.players;
|
||||
if (gamespyState.players.length) state.players = gamespyState.players;
|
||||
else if (gamespyState.raw.numplayers) state.players = parseInt(gamespyState.raw.numplayers);
|
||||
}
|
||||
// remove dupe spaces from name
|
||||
state.name = state.name.replace(/\s+/g, ' ');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue