Skip to content

Commit

Permalink
Merge branch 'hotfix/v23.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed May 28, 2023
2 parents e12353b + 778b004 commit 084553c
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 37 deletions.
2 changes: 1 addition & 1 deletion lgsm/functions/core_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

modulesversion="v23.3.0"
modulesversion="v23.2.3"

# Core

Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/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.0"
modulesversion="v23.3.1"

# Core

Expand Down
6 changes: 5 additions & 1 deletion lgsm/modules/command_dev_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare -A server_details=(
['HTTP Password']="${httppassword}"
['HTTP Port']="${httpport}"
['HTTP User']="${httpuser}"
['ip']="${ip}"
['Internet IP']="${extip}"
['LAN Port']="${lanport}"
['Master Port']="${masterport}"
['Master']="${master}"
Expand All @@ -56,12 +56,16 @@ declare -A server_details=(
['RCON Password']="${rconpassword}"
['RCON Port']="${rconport}"
['Reserved Slots']="${reservedslots}"
['Server IP']="${ip}"
['Server Password']="${serverpassword}"
['Servername']="${servername}"
['Shard']="${shard}"
['Sharding']="${sharding}"
['Steam Auth Port']="${steamauthport}"
['Telnet Enabled']="${telnetenabled}"
['Telnet IP']="${telnetip}"
['Telnet Password']="${telnetpassword}"
['Telnet Port']="${telnetport}"
['Tickrate']="${tickrate}"
['World Name']="${worldname}"
['World Type']="${worldtype}"
Expand Down
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.0"
modulesversion="v23.3.1"

# 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.0"
modulesversion="v23.3.1"

# Core

Expand Down
53 changes: 27 additions & 26 deletions lgsm/modules/info_game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1883,38 +1883,39 @@ fn_info_game_scpsl() {
# Filetype: xml
fn_info_game_sdtd() {
if [ -f "${servercfgfullpath}" ]; then
fn_info_game_xml "gamemode" "ServerSettings/@GameMode"
fn_info_game_xml "maxplayers" "ServerSettings/@MaxPlayers"
fn_info_game_xml "servername" "ServerSettings/@ServerName"
fn_info_game_xml "serverpassword" "ServerSettings/@ServerPassword"
fn_info_game_xml "serverport" "ServerSettings/@ServerPort"
fn_info_game_xml "telnetenabled" "ServerSettings/@TelnetEnabled"
fn_info_game_xml "telnetpass" "ServerSettings/@TelnetPassword"
fn_info_game_xml "telnetport" "ServerSettings/@TelnetPort"
fn_info_game_xml "httpenabled" "ServerSettings/@ControlPanelEnabled"
fn_info_game_xml "httppassword" "ServerSettings/@ControlPanelPassword"
fn_info_game_xml "httpport" "ServerSettings/@ControlPanelPort"
fn_info_game_xml "worldname" "ServerSettings/@GameWorld"

fn_info_game_xml "gamemode" "/ServerSettings/property[@name='GameMode']/@value"
fn_info_game_xml "httpenabled" "/ServerSettings/property[@name='ControlPanelEnabled']/@value"
fn_info_game_xml "httppassword" "/ServerSettings/property[@name='ControlPanelPassword']/@value"
fn_info_game_xml "httpport" "/ServerSettings/property[@name='ControlPanelPort']/@value"
fn_info_game_xml "maxplayers" "/ServerSettings/property[@name='ServerMaxPlayerCount']/@value"
fn_info_game_xml "servername" "/ServerSettings/property[@name='ServerName']/@value"
fn_info_game_xml "serverpassword" "/ServerSettings/property[@name='ServerPassword']/@value"
fn_info_game_xml "port" "/ServerSettings/property[@name='ServerPort']/@value"
fn_info_game_xml "telnetenabled" "/ServerSettings/property[@name='TelnetEnabled']/@value"
fn_info_game_xml "telnetpass" "/ServerSettings/property[@name='TelnetPassword']/@value"
fn_info_game_xml "telnetport" "/ServerSettings/property[@name='TelnetPort']/@value"
fn_info_game_xml "worldname" "/ServerSettings/property[@name='GameWorld']/@value"
fi
servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}"
port="${port:-"0"}"
queryport="${queryport:-"0"}"
gamemode="${gamemode:-"NOT SET"}"
httpenabled="${httpenabled:-"NOT SET"}"
httpport="${httpport:-"0"}"
httppassword="${httppassword:-"NOT SET"}"
telnetenabled="${telnetenabled:-"NOT SET"}"
telnetport="${telnetport:-"0"}"
telnetpass="${telnetpass:-"NOT SET"}"
httpport="${httpport:-"0"}"
maxplayers="${maxplayers:-"0"}"
gamemode="${gamemode:-"NOT SET"}"
worldname="${worldname:-"NOT SET"}"
port="${port:-"0"}"
port3="$((port + 2))"
queryport="${port:-"0"}"
servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}"
telnetenabled="${telnetenabled:-"NOT SET"}"
# Telnet IP will be localhost if no password is set
# check_ip will set the IP first. This will overwrite it.
if [ -z "${telnetpass}" ]; then
telnetip="127.0.0.1"
fi
telnetpass="${telnetpass:-"NOT SET"}"
telnetport="${telnetport:-"0"}"
worldname="${worldname:-"NOT SET"}"

}

# Config Type: Parameters (with an ini)
Expand Down Expand Up @@ -2443,12 +2444,12 @@ if [ -z "${displaymasterserver}" ]; then
if [ "$(command -v jq 2> /dev/null)" ]; then
if [ -n "${ip}" ] && [ -n "${port}" ]; then
if [ "${steammaster}" == "true" ] || [ "${commandname}" == "DEV-QUERY-RAW" ]; then
# Query external IP first as most likely to succeed.
masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)"
# Query external IP first as most liky to succeed.
masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${extip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)"
if [ "${masterserver}" == "0" ]; then
# Loop though server IP addresses if external IP fails.
for queryip in "${queryips[@]}"; do
masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)"
masterserver="$(curl --connect-timeout 10 -m 3 -s "https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=${queryip}&format=json" | jq --arg port "${port}" --arg queryport "${queryport}" --arg port3 "${port3}" 'if .response.servers != null then .response.servers[] | select((.gameport == ($port|tonumber) or .gameport == ($queryport|tonumber) or .gameport == ($port3|tonumber))) | .addr else empty end' | wc -l 2> /dev/null)"
done
fi
if [ "${masterserver}" == "0" ]; then
Expand Down
1 change: 0 additions & 1 deletion lgsm/modules/info_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,6 @@ fn_info_message_sdtd() {
{
echo -e "${lightblue}Web Interface enabled:\t${default}${httpenabled}"
echo -e "${lightblue}Web Interface url:\t${default}http://${httpip}:${httpport}/index.html"
echo -e "${lightblue}Web Interface username:\t${default}${httpuser}"
echo -e "${lightblue}Web Interface password:\t${default}${httppassword}"
} | column -s $'\t' -t
echo -e ""
Expand Down
2 changes: 1 addition & 1 deletion 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.0"
version="v23.3.1"
shortname="core"
gameservername="core"
commandname="CORE"
Expand Down
2 changes: 1 addition & 1 deletion 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.0"
version="v23.3.1"
shortname="fctr"
gameservername="fctrserver"
commandname="CORE"
Expand Down
2 changes: 1 addition & 1 deletion 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.0"
version="v23.3.1"
shortname="jc2"
gameservername="jc2server"
commandname="CORE"
Expand Down
2 changes: 1 addition & 1 deletion 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.0"
version="v23.3.1"
shortname="mc"
gameservername="mcserver"
commandname="CORE"
Expand Down
2 changes: 1 addition & 1 deletion 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.0"
version="v23.3.1"
shortname="ts3"
gameservername="ts3server"
commandname="CORE"
Expand Down

0 comments on commit 084553c

Please sign in to comment.