Browse Source

feat(ro): Migrate to using valve query by default

pull/4657/head
Daniel Gibbs 7 months ago
parent
commit
ee8d30f706
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 2
      lgsm/config-default/config-lgsm/roserver/_default.cfg
  2. 8
      lgsm/modules/command_dev_parse_game_details.sh
  3. 2
      lgsm/modules/core_messages.sh
  4. 36
      lgsm/modules/info_game.sh
  5. 19
      lgsm/modules/info_messages.sh

2
lgsm/config-default/config-lgsm/roserver/_default.cfg

@ -142,7 +142,7 @@ stopmode="2"
# 4: gsquery # 4: gsquery
# 5: tcp # 5: tcp
querymode="2" querymode="2"
querytype="protocol-unreal2" querytype="protocol-valve"
## Console type ## Console type
consoleverbose="yes" consoleverbose="yes"

8
lgsm/modules/command_dev_parse_game_details.sh

@ -74,12 +74,12 @@ declare -A server_details=(
['Port IPv6']="${portipv6}" ['Port IPv6']="${portipv6}"
['Port']="${port}" ['Port']="${port}"
['Query Enabled']="${queryenabled}" ['Query Enabled']="${queryenabled}"
['Query HTTP Port']="${queryhttpport}" ['Query HTTP Port']="${httpqueryport}"
['Query HTTPS Port']="${queryhttpsport}" ['Query HTTPS Port']="${httpsqueryport}"
['Query Mode']="${querymode}" ['Query Mode']="${querymode}"
['Query Port GS']="${queryportgs}" ['Query Port GS']="${gamespyqueryport}"
['Query Port']="${queryport}" ['Query Port']="${queryport}"
['Query SSH Port']="${querysshport}" ['Query SSH Port']="${sshqueryport}"
['Queue Enabled']="${queueenabled}" ['Queue Enabled']="${queueenabled}"
['Queue Port']="${queueport}" ['Queue Port']="${queueport}"
['Random Map']="${randommap}" ['Random Map']="${randommap}"

2
lgsm/modules/core_messages.sh

@ -31,7 +31,7 @@ fn_ansi_loader() {
darkgrey="\e[90m" darkgrey="\e[90m"
lightgrey="\e[37m" lightgrey="\e[37m"
white="\e[97m" white="\e[97m"
# erase to end of line. # erase to end of line.
creeol+="\033[K" creeol+="\033[K"
fi fi
} }

36
lgsm/modules/info_game.sh

@ -496,7 +496,7 @@ fn_info_game_kf() {
fn_info_game_ini "lanport" "LANServerPort" fn_info_game_ini "lanport" "LANServerPort"
fn_info_game_ini "maxplayers" "MaxPlayers" fn_info_game_ini "maxplayers" "MaxPlayers"
fn_info_game_ini "port" "Port" fn_info_game_ini "port" "Port"
fn_info_game_ini "queryportgs" "QueryPort" fn_info_game_ini "gamespyqueryport" "QueryPort"
fn_info_game_ini "servername" "ServerName" fn_info_game_ini "servername" "ServerName"
fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "serverpassword" "GamePassword"
fi fi
@ -510,7 +510,7 @@ fn_info_game_kf() {
maxplayers="${maxplayers:-"0"}" maxplayers="${maxplayers:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
queryport="$((port + 1))" queryport="$((port + 1))"
queryportgs="${queryportgs:-"0"}" gamespyqueryport="${gamespyqueryport:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}"
steamport="28852" steamport="28852"
@ -754,19 +754,19 @@ fn_info_game_ts3() {
fn_info_game_ini "dbplugin" "dbplugin" fn_info_game_ini "dbplugin" "dbplugin"
fn_info_game_ini "fileport" "filetransfer_port" fn_info_game_ini "fileport" "filetransfer_port"
fn_info_game_ini "port" "default_voice_port" fn_info_game_ini "port" "default_voice_port"
fn_info_game_ini "queryhttpport" "query_http_port" fn_info_game_ini "httpqueryport" "query_http_port"
fn_info_game_ini "queryhttpsport" "query_https_port" fn_info_game_ini "httpsqueryport" "query_https_port"
fn_info_game_ini "queryport" "query_port" fn_info_game_ini "queryport" "query_port"
fn_info_game_ini "querysshport" "query_ssh_port" fn_info_game_ini "sshqueryport" "query_ssh_port"
fi fi
configip="${configip:-"0.0.0.0"}" configip="${configip:-"0.0.0.0"}"
dbplugin="${dbplugin:-"NOT SET"}" dbplugin="${dbplugin:-"NOT SET"}"
fileport="${fileport:-"0"}" fileport="${fileport:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
queryhttpport="${queryhttpport:-"0"}" httpqueryport="${httpqueryport:-"0"}"
queryhttpsport="${queryhttpsport:-"0"}" httpsqueryport="${httpsqueryport:-"0"}"
queryport="${queryport:-"0"}" queryport="${queryport:-"0"}"
querysshport="${querysshport:-"0"}" sshqueryport="${sshqueryport:-"0"}"
telnetport="${queryport}" telnetport="${queryport}"
} }
@ -797,7 +797,7 @@ fn_info_game_ut99() {
fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "adminpassword" "AdminPassword"
fn_info_game_ini "beaconport" "ServerBeaconPort" fn_info_game_ini "beaconport" "ServerBeaconPort"
fn_info_game_ini "port" "Port" fn_info_game_ini "port" "Port"
fn_info_game_ini "queryportgs" "OldQueryPortNumber" fn_info_game_ini "gamespyqueryport" "OldQueryPortNumber"
fn_info_game_ini "servername" "ServerName" fn_info_game_ini "servername" "ServerName"
fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "serverpassword" "GamePassword"
fn_info_game_ini "httpenabled" "bEnabled" fn_info_game_ini "httpenabled" "bEnabled"
@ -811,7 +811,7 @@ fn_info_game_ut99() {
httpport="${httpport:-"0"}" httpport="${httpport:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
queryport="$((port + 1))" queryport="$((port + 1))"
queryportgs="${queryportgs:-"0"}" gamespyqueryport="${gamespyqueryport:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}"
httpenabled="${httpenabled:-"0"}" httpenabled="${httpenabled:-"0"}"
@ -857,7 +857,7 @@ fn_info_game_unreal2() {
fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "adminpassword" "AdminPassword"
fn_info_game_ini "httpport" "ListenPort" fn_info_game_ini "httpport" "ListenPort"
fn_info_game_ini "port" "Port" fn_info_game_ini "port" "Port"
fn_info_game_ini "queryportgs" "OldQueryPortNumber" fn_info_game_ini "gamespyqueryport" "OldQueryPortNumber"
fn_info_game_ini "servername" "ServerName" fn_info_game_ini "servername" "ServerName"
fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "serverpassword" "GamePassword"
fn_info_game_ini "httpenabled" "bEnabled" fn_info_game_ini "httpenabled" "bEnabled"
@ -868,7 +868,7 @@ fn_info_game_unreal2() {
httpport="${httpport:-"0"}" httpport="${httpport:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
queryport="$((port + 1))" queryport="$((port + 1))"
queryportgs="${queryportgs:-"0"}" gamespyqueryport="${gamespyqueryport:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}"
httpenabled="${httpenabled:-"0"}" httpenabled="${httpenabled:-"0"}"
@ -902,7 +902,7 @@ fn_info_game_ut2k4() {
fn_info_game_ini "httpport" "ListenPort" fn_info_game_ini "httpport" "ListenPort"
fn_info_game_ini "lanport" "LANServerPort" fn_info_game_ini "lanport" "LANServerPort"
fn_info_game_ini "port" "Port" fn_info_game_ini "port" "Port"
fn_info_game_ini "queryportgs" "OldQueryPortNumber" fn_info_game_ini "gamespyqueryport" "OldQueryPortNumber"
fn_info_game_ini "servername" "ServerName" fn_info_game_ini "servername" "ServerName"
fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "serverpassword" "GamePassword"
fn_info_game_ini "httpenabled" "bEnabled" fn_info_game_ini "httpenabled" "bEnabled"
@ -914,7 +914,7 @@ fn_info_game_ut2k4() {
lanport="${lanport:-"0"}" lanport="${lanport:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
queryport="$((port + 1))" queryport="$((port + 1))"
queryportgs="${queryportgs:-"0"}" gamespyqueryport="${gamespyqueryport:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}"
httpenabled="${httpenabled:-"0"}" httpenabled="${httpenabled:-"0"}"
@ -1771,7 +1771,6 @@ fn_info_game_ro() {
fn_info_game_ini "lanport" "LANServerPort" fn_info_game_ini "lanport" "LANServerPort"
fn_info_game_ini "maxplayers" "MaxPlayers" fn_info_game_ini "maxplayers" "MaxPlayers"
fn_info_game_ini "port" "Port" fn_info_game_ini "port" "Port"
fn_info_game_ini "queryportgs" "QueryPort"
fn_info_game_ini "servername" "ServerName" fn_info_game_ini "servername" "ServerName"
fn_info_game_ini "serverpassword" "GamePassword" fn_info_game_ini "serverpassword" "GamePassword"
fi fi
@ -1784,12 +1783,11 @@ fn_info_game_ro() {
lanport="${lanport:-"0"}" lanport="${lanport:-"0"}"
maxplayers="${maxplayers:-"0"}" maxplayers="${maxplayers:-"0"}"
port="${port:-"0"}" port="${port:-"0"}"
queryport="$((port + 1))" queryport=$((28902 + (port - 7757))) # Valve Query Port
queryportgs="${queryportgs:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}"
steamport="28902" steamport="20610"
steamworksport="20610" unreal2queryport="$((port + 1))" # Unreal2 Query Port
} }
# Config Type: QuakeC # Config Type: QuakeC

19
lgsm/modules/info_messages.sh

@ -832,7 +832,7 @@ fn_info_messages_armar() {
{ {
fn_port "header" fn_port "header"
fn_port "Game" port udp fn_port "Game" port udp
fn_port "Steam Query" queryport udp fn_port "Query" queryport udp
fn_port "BattleEye" battleeyeport tcp fn_port "BattleEye" battleeyeport tcp
} | column -s $'\t' -t } | column -s $'\t' -t
} }
@ -1130,7 +1130,7 @@ fn_info_messages_kf() {
fn_port "header" fn_port "header"
fn_port "Game" port udp fn_port "Game" port udp
fn_port "Query" queryport udp fn_port "Query" queryport udp
fn_port "Query (GameSpy)" queryportgs udp fn_port "Query (GameSpy)" gamespyqueryport udp
fn_port "Web Interface" httpport tcp fn_port "Web Interface" httpport tcp
fn_port "LAN" lanport udp fn_port "LAN" lanport udp
fn_port "Steamworks P2P" steamworksport udp fn_port "Steamworks P2P" steamworksport udp
@ -1343,11 +1343,12 @@ fn_info_messages_ro() {
{ {
fn_port "header" fn_port "header"
fn_port "Game" port udp fn_port "Game" port udp
fn_port "Query" queryport udp fn_port "Query - Steam" queryport udp
fn_port "Query - Unreal 2" unreal2queryport udp
fn_port "Web Interface" httpport tcp fn_port "Web Interface" httpport tcp
fn_port "LAN" lanport udp fn_port "LAN" lanport udp
fn_port "Steamworks P2P" steamworksport udp
fn_port "Steam" steamport udp fn_port "Steam" steamport udp
} | column -s $'\t' -t } | column -s $'\t' -t
echo -e "" echo -e ""
echo -e "${bold}${lightgreen}${servername} Web Interface${default}" echo -e "${bold}${lightgreen}${servername} Web Interface${default}"
@ -1504,7 +1505,7 @@ fn_info_messages_source() {
fn_port "Query" queryport tcp fn_port "Query" queryport tcp
fn_port "RCON" rconport tcp fn_port "RCON" rconport tcp
fn_port "SourceTV" sourcetvport udp fn_port "SourceTV" sourcetvport udp
# Will not show if unaviable # Will not show if unavailable
if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then
fn_port "Steam" steamport udp fn_port "Steam" steamport udp
fi fi
@ -1570,9 +1571,9 @@ fn_info_messages_ts3() {
fn_port "header" fn_port "header"
fn_port "Voice" port udp fn_port "Voice" port udp
fn_port "Query" queryport tcp fn_port "Query" queryport tcp
fn_port "Query (SSH)" querysshport tcp fn_port "Query (SSH)" sshqueryport tcp
fn_port "Query (http)" queryhttpport tcp fn_port "Query (http)" httpqueryport tcp
fn_port "Query (https)" queryhttpsport tcp fn_port "Query (https)" httpsqueryport tcp
fn_port "File Transfer" fileport tcp fn_port "File Transfer" fileport tcp
fn_port "Telnet" telnetport tcp fn_port "Telnet" telnetport tcp
} | column -s $'\t' -t } | column -s $'\t' -t
@ -1618,7 +1619,7 @@ fn_info_messages_ut2k4() {
fn_port "header" fn_port "header"
fn_port "Game" port udp fn_port "Game" port udp
fn_port "Query" queryport udp fn_port "Query" queryport udp
fn_port "Query (GameSpy)" queryportgs udp fn_port "Query (GameSpy)" gamespyqueryport udp
fn_port "Web Interface" httpport tcp fn_port "Web Interface" httpport tcp
fn_port "LAN" lanport udp fn_port "LAN" lanport udp
} | column -s $'\t' -t } | column -s $'\t' -t

Loading…
Cancel
Save