feat(kf): Migrate to using valve query

This commit is contained in:
Daniel Gibbs 2024-09-21 23:22:07 +01:00
parent ee8d30f706
commit 8032eca4b1
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
3 changed files with 14 additions and 9 deletions

View File

@ -146,7 +146,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"

View File

@ -496,12 +496,13 @@ 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 "gamespyqueryport" "QueryPort" 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"
fi fi
adminpassword="${adminpassword:-"NOT SET"}" adminpassword="${adminpassword:-"NOT SET"}"
defaultmap="${defaultmap:-"NOT SET"}" defaultmap="${defaultmap:-"NOT SET"}"
gamespyqueryport="${gamespyqueryport:-"0"}" # Gamespy Query Port
httpenabled="${httpenabled:-"NOT SET"}" httpenabled="${httpenabled:-"NOT SET"}"
httppassword="${adminpassword}" httppassword="${adminpassword}"
httpport="${httpport:-"0"}" httpport="${httpport:-"0"}"
@ -509,12 +510,11 @@ fn_info_game_kf() {
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
gamespyqueryport="${gamespyqueryport:-"0"}"
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}"
steamport="28852" steamport="20610"
steamworksport="20560" unreal2queryport="$((port + 1))" # Unreal2 Query Port
} }
# Config Type: ini # Config Type: ini
@ -1761,6 +1761,11 @@ fn_info_game_qw() {
servername="${servername:-"NOT SET"}" servername="${servername:-"NOT SET"}"
} }
# Config Type: ini
# Parameters: true
# Comment: ; or #
# Example: ServerName=SERVERNAME
# Filetype: ini
fn_info_game_ro() { fn_info_game_ro() {
if [ -f "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then
fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "adminpassword" "AdminPassword"

View File

@ -1129,11 +1129,11 @@ 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 - Steam" queryport udp
fn_port "Query (GameSpy)" gamespyqueryport udp fn_port "Query - Unreal 2" unreal2queryport 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 "Steam" steamport udp fn_port "Steam" steamport udp
} | column -s $'\t' -t } | column -s $'\t' -t
echo -e "" echo -e ""