mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-07 03:26:50 +08:00
feat(kf): Migrate to using valve query
This commit is contained in:
parent
ee8d30f706
commit
8032eca4b1
@ -146,7 +146,7 @@ stopmode="2"
|
||||
# 4: gsquery
|
||||
# 5: tcp
|
||||
querymode="2"
|
||||
querytype="protocol-unreal2"
|
||||
querytype="protocol-valve"
|
||||
|
||||
## Console type
|
||||
consoleverbose="yes"
|
||||
|
@ -496,12 +496,13 @@ fn_info_game_kf() {
|
||||
fn_info_game_ini "lanport" "LANServerPort"
|
||||
fn_info_game_ini "maxplayers" "MaxPlayers"
|
||||
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 "serverpassword" "GamePassword"
|
||||
fi
|
||||
adminpassword="${adminpassword:-"NOT SET"}"
|
||||
defaultmap="${defaultmap:-"NOT SET"}"
|
||||
gamespyqueryport="${gamespyqueryport:-"0"}" # Gamespy Query Port
|
||||
httpenabled="${httpenabled:-"NOT SET"}"
|
||||
httppassword="${adminpassword}"
|
||||
httpport="${httpport:-"0"}"
|
||||
@ -509,12 +510,11 @@ fn_info_game_kf() {
|
||||
lanport="${lanport:-"0"}"
|
||||
maxplayers="${maxplayers:-"0"}"
|
||||
port="${port:-"0"}"
|
||||
queryport="$((port + 1))"
|
||||
gamespyqueryport="${gamespyqueryport:-"0"}"
|
||||
queryport=$((28902 + (port - 7757))) # Valve Query Port
|
||||
servername="${servername:-"NOT SET"}"
|
||||
serverpassword="${serverpassword:-"NOT SET"}"
|
||||
steamport="28852"
|
||||
steamworksport="20560"
|
||||
steamport="20610"
|
||||
unreal2queryport="$((port + 1))" # Unreal2 Query Port
|
||||
}
|
||||
|
||||
# Config Type: ini
|
||||
@ -1761,6 +1761,11 @@ fn_info_game_qw() {
|
||||
servername="${servername:-"NOT SET"}"
|
||||
}
|
||||
|
||||
# Config Type: ini
|
||||
# Parameters: true
|
||||
# Comment: ; or #
|
||||
# Example: ServerName=SERVERNAME
|
||||
# Filetype: ini
|
||||
fn_info_game_ro() {
|
||||
if [ -f "${servercfgfullpath}" ]; then
|
||||
fn_info_game_ini "adminpassword" "AdminPassword"
|
||||
|
@ -1129,11 +1129,11 @@ fn_info_messages_kf() {
|
||||
{
|
||||
fn_port "header"
|
||||
fn_port "Game" port udp
|
||||
fn_port "Query" queryport udp
|
||||
fn_port "Query (GameSpy)" gamespyqueryport udp
|
||||
fn_port "Query - Steam" queryport udp
|
||||
fn_port "Query - Unreal 2" unreal2queryport udp
|
||||
fn_port "Query - Gamespy" gamespyqueryport udp
|
||||
fn_port "Web Interface" httpport tcp
|
||||
fn_port "LAN" lanport udp
|
||||
fn_port "Steamworks P2P" steamworksport udp
|
||||
fn_port "Steam" steamport udp
|
||||
} | column -s $'\t' -t
|
||||
echo -e ""
|
||||
|
Loading…
Reference in New Issue
Block a user