From 42758c8ae49a20142e7f43cafee6cf2267d50b54 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 17 Jun 2020 21:03:12 +0100 Subject: [PATCH] correct else --- lgsm/functions/query_gamedig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 6e3a9122a..29d5175a0 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -33,14 +33,14 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # numplayers. if [ "${querytype}" == "minecraft" ]; then - gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') - else - gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1') + else + gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length') fi if [ "${gdplayers}" == "null" ]; then unset gdplayers elif [ "${gdplayers}" == "[]" ] || [ "${gdplayers}" == "-1" ]; then - gdplayers=0 + gdplayers=0 fi # maxplayers.