diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 45994a496..cca044518 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -163,11 +163,6 @@ fn_start_tmux() { fi rm -f "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2> /dev/null echo -en "\n" - - # Send version command to Xonotic server. - if [ "${shortname}" == "xnt" ]; then - tmux -L "${socketname}" send-keys -t "${sessionname}" version > /dev/null 2>&1 - fi } # If user ran the start command monitor will become enabled. diff --git a/lgsm/modules/update_xnt.sh b/lgsm/modules/update_xnt.sh index 8dc45264b..1a770a4a1 100644 --- a/lgsm/modules/update_xnt.sh +++ b/lgsm/modules/update_xnt.sh @@ -18,6 +18,11 @@ fn_update_dl() { fn_update_localbuild() { # Gets local build info. fn_print_dots "Checking local build: ${remotelocation}" + + # Send version command to Xonotic server. + tmux -L "${socketname}" send-keys -t "${sessionname}" "version\r" > /dev/null 2>&1 + fn_sleep_time_1 + # Uses log file to get local build. localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037') if [ -z "${localbuild}" ]; then