Browse Source

add game server version

pull/3420/head
Daniel Gibbs 5 years ago
parent
commit
07ce99ff5c
  1. 5
      lgsm/functions/info_messages.sh
  2. 6
      lgsm/functions/query_gamedig.sh

5
lgsm/functions/info_messages.sh

@ -262,6 +262,11 @@ fn_info_message_gameserver(){
echo -e "${lightblue}Beta Password:\t${default}${betapassword}"
fi
# Bots
if [ -n "${gdversion}" ]; then
echo -e "${lightblue}Server Version:\t${default}${gdversion}"
fi
# Server ip
echo -e "${lightblue}Server IP:\t${default}${ip}:${port}"

6
lgsm/functions/query_gamedig.sh

@ -68,5 +68,11 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then
unset gdbots
fi
# server version.
gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version')
if [ "${gdversion}" == "null" ]||[ "${gdversion}" == "0" ]; then
unset gdversion
fi
fi
fi

Loading…
Cancel
Save