From dc053ff9368fef3edc4fef8ed96bffc680f0d9b5 Mon Sep 17 00:00:00 2001 From: Jimmy Maple <38733055+jimmyatSplunk@users.noreply.github.com> Date: Sun, 12 Apr 2020 23:23:15 -0400 Subject: [PATCH] fix(bug): gamedig not using correct JSON object Command to output the results for player count was looking at the wrong object in the tree. This change corrects it to the right objects. --- lgsm/functions/query_gamedig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 4f1bc5638..bfe38b937 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -30,7 +30,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; fi # numplayers. - gdplayers=$(echo -e "${gamedigraw}" | jq -re '.players') + gdplayers=$(echo -e "${gamedigraw}" | jq -re '.raw.vanilla.raw.players.online') if [ "${gdplayers}" == "null" ]; then unset gdplayers elif [ "${gdplayers}" == "[]" ]; then