Browse Source

fix(gamedig): default exitcode & var name (#4161)

pull/4162/head
jusito 2 years ago
committed by GitHub
parent
commit
52ed09c1bb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lgsm/functions/query_gamedig.sh

4
lgsm/functions/query_gamedig.sh

@ -7,7 +7,7 @@
# https://github.com/sonicsnes/node-gamedig # https://github.com/sonicsnes/node-gamedig
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
querystatus="2"
# Check if gamedig and jq are installed. # Check if gamedig and jq are installed.
if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then
@ -81,7 +81,7 @@ if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)"
# server version. # server version.
if [ "${querytype}" == "teamspeak3" ]; then if [ "${querytype}" == "teamspeak3" ]; then
dversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version') gdversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version')
else else
gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version')
fi fi

Loading…
Cancel
Save