Skip to content

Commit

Permalink
Merge branch 'hotfix/v23.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed May 29, 2023
2 parents 084553c + 58c173d commit 9d22c70
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 31 deletions.
2 changes: 1 addition & 1 deletion lgsm/modules/core_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

modulesversion="v23.3.1"
modulesversion="v23.3.2"

# Core

Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/core_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

modulesversion="v23.3.1"
modulesversion="v23.3.2"

# Core

Expand Down
49 changes: 32 additions & 17 deletions lgsm/modules/info_game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fn_info_game_json() {
else
servercfgparse="${servercfgfullpath}"
fi
eval "${1}=\"$(jq -r "${2}" "${servercfgfullpath}")\""
eval "${1}=\"$(jq -r "${2}" "${servercfgparse}")\""
configtype="json"
}

Expand Down Expand Up @@ -1826,15 +1826,15 @@ fn_info_game_samp() {
# Parameters: false
# Comment: // or /* */
fn_info_game_sb() {
if [ ! -f "${servercfgfullpath}" ]; then
fn_info_game_json "maxplayers" "maxPlayers"
fn_info_game_json "port" "gameServerPort"
fn_info_game_json "queryenabled" "runQueryServer"
fn_info_game_json "queryport" "queryServerPort"
fn_info_game_json "rconenabled" "runRconServer"
fn_info_game_json "rconpassword" "rconServerPassword"
fn_info_game_json "rconport" "rconServerPort"
fn_info_game_json "servername" "serverName"
if [ -f "${servercfgfullpath}" ]; then
fn_info_game_json "maxplayers" ".maxPlayers"
fn_info_game_json "port" ".gameServerPort"
fn_info_game_json "queryenabled" ".runQueryServer"
fn_info_game_json "queryport" ".queryServerPort"
fn_info_game_json "rconenabled" ".runRconServer"
fn_info_game_json "rconpassword" ".rconServerPassword"
fn_info_game_json "rconport" ".rconServerPort"
fn_info_game_json "servername" ".serverName"
fi
maxplayers="${maxplayers:-"0"}"
port="${port:-"0"}"
Expand Down Expand Up @@ -1954,11 +1954,11 @@ fn_info_game_sof2() {
# Filetype: ini
fn_info_game_sol() {
if [ -f "${servercfgfullpath}" ]; then
fn_info_config_ini "adminpassword" "Admin_Password"
fn_info_config_ini "maxplayers" "Max_Players"
fn_info_config_ini "port" "Port"
fn_info_config_ini "servername" "Server_Name"
fn_info_config_ini "serverpassword" "Game_Password"
fn_info_game_ini "adminpassword" "Admin_Password"
fn_info_game_ini "maxplayers" "Max_Players"
fn_info_game_ini "port" "Port"
fn_info_game_ini "servername" "Server_Name"
fn_info_game_ini "serverpassword" "Game_Password"
fi
adminpassword="${adminpassword:-"NOT SET"}"
maxplayers="${maxplayers:-"0"}"
Expand Down Expand Up @@ -2019,8 +2019,8 @@ fn_info_game_squad() {
fn_info_game_keyvalue_pairs "maxplayers" "MaxPlayers"
fi
if [ -f "${servercfgdir}/Rcon.cfg" ]; then
fn_info_game_keyvalue_pairs "rconport" "Port"
fn_info_game_keyvalue_pairs "rconpassword" "Password"
fn_info_game_keyvalue_pairs "rconport" "Port" "${servercfgdir}/Rcon.cfg"
fn_info_game_keyvalue_pairs "rconpassword" "Password" "${servercfgdir}/Rcon.cfg"
fi
maxplayers="${maxplayers:-"0"}"
port="${port:-"0"}"
Expand Down Expand Up @@ -2441,6 +2441,14 @@ fi
# Steam Master Server - checks if detected by master server.
# Checked after config init, as the queryport is needed
if [ -z "${displaymasterserver}" ]; then
# if queryport and port3 are not set then set them to 123456789
# this is to prevent the query from failing.
if [ -z "${queryport}" ]; then
queryport="123456789"
fi
if [ -z "${port3}" ]; then
port3="123456789"
fi
if [ "$(command -v jq 2> /dev/null)" ]; then
if [ -n "${ip}" ] && [ -n "${port}" ]; then
if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then
Expand All @@ -2460,4 +2468,11 @@ if [ -z "${displaymasterserver}" ]; then
fi
fi
fi
# unset the ports if they are set to 123456789
if [ "${port3}" == "123456789" ]; then
unset port3
fi
if [ "${queryport}" == "123456789" ]; then
unset queryport
fi
fi
4 changes: 2 additions & 2 deletions lgsm/modules/install_squad_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ echo -e "Server license is an optional feature for ${gamename} server"
fn_script_log_info "Server license is an optional feature for ${gamename} server"

echo -e "Get more info and a server license here:"
echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/"
echo -e "https://squad.fandom.com/wiki/Server_licensing"
fn_script_log_info "Get more info and a server license here:"
fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/"
fn_script_log_info "https://squad.fandom.com/wiki/Server_licensing"
echo -e ""
fn_sleep_time
echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg."
Expand Down
5 changes: 3 additions & 2 deletions linuxgsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi

version="v23.3.1"
version="v23.3.2"
shortname="core"
gameservername="core"
commandname="CORE"
Expand Down Expand Up @@ -369,7 +369,8 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo -e "[ FAIL ] unknown game server"
echo -e "[ FAIL ] Unknown game server"
exit 1
fi
else
fn_install_getopt
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_fctrserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi

version="v23.3.1"
version="v23.3.2"
shortname="fctr"
gameservername="fctrserver"
commandname="CORE"
Expand Down Expand Up @@ -369,7 +369,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo -e "[ FAIL ] unknown game server"
echo -e "[ FAIL ] Unknown game server"
fi
else
fn_install_getopt
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_jc2server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi

version="v23.3.1"
version="v23.3.2"
shortname="jc2"
gameservername="jc2server"
commandname="CORE"
Expand Down Expand Up @@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo -e "[ FAIL ] unknown game server"
echo -e "[ FAIL ] Unknown game server"
fi
else
fn_install_getopt
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_mcserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi

version="v23.3.1"
version="v23.3.2"
shortname="mc"
gameservername="mcserver"
commandname="CORE"
Expand Down Expand Up @@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo -e "[ FAIL ] unknown game server"
echo -e "[ FAIL ] Unknown game server"
fi
else
fn_install_getopt
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_ts3server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi

version="v23.3.1"
version="v23.3.2"
shortname="ts3"
gameservername="ts3server"
commandname="CORE"
Expand Down Expand Up @@ -370,7 +370,7 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "${gameservername}" ] || [ "${userinput}" == "${gamename}" ] || [ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo -e "[ FAIL ] unknown game server"
echo -e "[ FAIL ] Unknown game server"
fi
else
fn_install_getopt
Expand Down

0 comments on commit 9d22c70

Please sign in to comment.