|
@ -89,37 +89,37 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; |
|
|
# server name |
|
|
# server name |
|
|
gdname=$(echo "${gamedigraw}" | jq -re '.name') |
|
|
gdname=$(echo "${gamedigraw}" | jq -re '.name') |
|
|
if [ "${gdname}" == "null" ]; then |
|
|
if [ "${gdname}" == "null" ]; then |
|
|
gdname= |
|
|
unset gdname |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# numplayers |
|
|
# numplayers |
|
|
gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length') |
|
|
gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length') |
|
|
if [ "${gdplayers}" == "null" ]; then |
|
|
if [ "${gdplayers}" == "null" ]; then |
|
|
gdplayers= |
|
|
unset gdplayers |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# maxplayers |
|
|
# maxplayers |
|
|
gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length') |
|
|
gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length') |
|
|
if [ "${gdmaxplayers}" == "null" ]; then |
|
|
if [ "${gdmaxplayers}" == "null" ]; then |
|
|
maxplayers= |
|
|
unset maxplayers |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# current map |
|
|
# current map |
|
|
gdmap=$(echo "${gamedigraw}" | jq -re '.map') |
|
|
gdmap=$(echo "${gamedigraw}" | jq -re '.map') |
|
|
if [ "${gdmap}" == "null" ]; then |
|
|
if [ "${gdmap}" == "null" ]; then |
|
|
gdmap= |
|
|
unset gdmap |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# current gamemode |
|
|
# current gamemode |
|
|
gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') |
|
|
gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') |
|
|
if [ "${gdgamemode}" == "null" ]; then |
|
|
if [ "${gdgamemode}" == "null" ]; then |
|
|
gdgamemode= |
|
|
unset gdgamemode |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# numbots |
|
|
# numbots |
|
|
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') |
|
|
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') |
|
|
if [ "${gdbots}" == "null" ]; then |
|
|
if [ "${gdbots}" == "null" ]; then |
|
|
gdbots= |
|
|
unset gdbots |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |