diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 131113bdf..2af5ab5da 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -338,7 +338,10 @@ fn_info_config_minecraft(){ rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') port=$(grep "server-port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - queryport="${port}" + queryport=$(grep "query.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + if [ -z "${queryport}" ]; then + queryport=${port} + fi queryenabled=$(grep "enable-query" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/enable-query//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') gamemode=$(grep "gamemode" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') gameworld=$(grep "level-name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/level-name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -353,7 +356,7 @@ fn_info_config_minecraft(){ rconport=${rconport:-"NOT SET"} maxplayers=${maxplayers:-"NOT SET"} port=${port:-"NOT SET"} - queryport="${queryport:-"NOT SET"}" + queryport=${queryport:-"NOT SET"} queryenabled="${queryenabled:-"NOT SET"}" gamemode=${gamemode:-"NOT SET"} gameworld=${gameworld:-"NOT SET"}