Browse Source

fix(mc): correct the of counting players online on Minecraft servers via gamedig

feature/4426-tf-fixes
Jimmy Maple 3 months ago
committed by GitHub
parent
commit
6adf4da6d8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      lgsm/modules/query_gamedig.sh

4
lgsm/modules/query_gamedig.sh

@ -42,9 +42,7 @@ if [ "$(command -v "${gamedigbinary}" 2> /dev/null)" ] && [ "$(command -v jq 2>
fi
# numplayers.
if [ "${querytype}" == "minecraft" ]; then
gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1')
elif [ "${querytype}" == "teamspeak3" ]; then
if [ "${querytype}" == "teamspeak3" ]; then
gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline')
else
gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length')

Loading…
Cancel
Save