From 0e7314d26ae9914a8af003cac3a0dbdc85af98fa Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Jun 2024 22:34:12 +0100 Subject: [PATCH] fix missing serverpassword detail (#4596) --- lgsm/modules/command_dev_parse_game_details.sh | 10 ++++------ lgsm/modules/info_game.sh | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lgsm/modules/command_dev_parse_game_details.sh b/lgsm/modules/command_dev_parse_game_details.sh index 4dcf33c2a3..2bb01e436b 100644 --- a/lgsm/modules/command_dev_parse_game_details.sh +++ b/lgsm/modules/command_dev_parse_game_details.sh @@ -70,7 +70,6 @@ declare -A server_details=( ['Max Players']="${maxplayers}" ['Mod Server Port']="${modserverport}" ['OldQueryPortNumber']="${oldqueryportnumber}" - ['Password']="${password}" ['Port 401']="${port401}" ['Port IPv6']="${portipv6}" ['Port']="${port}" @@ -85,7 +84,6 @@ declare -A server_details=( ['Queue Port']="${queueport}" ['Random Map']="${randommap}" ['Raw Port']="${rawport}" - ['RC Password']="${rcpassword}" ['RCON Enabled']="${rconenabled}" ['RCON Password']="${rconpassword}" ['RCON Port']="${rconport}" @@ -133,7 +131,7 @@ missing_details="" # Loop through the server details and store them. for key in "${!server_details[@]}"; do - value=${server_details[$key]} + value=${server_details[$key]} if [ -n "$value" ]; then available_details+="${lightblue}${key}: ${default}${value}\n" else @@ -144,9 +142,9 @@ done # Sort and output the available distro details. if [ -n "$available_details" ]; then echo -e "" - echo -e "${bold}${lightgreen}Available Gameserver Details${default}" - fn_messages_separator - echo -e "${available_details}" | sort + echo -e "${bold}${lightgreen}Available Gameserver Details${default}" + fn_messages_separator + echo -e "${available_details}" | sort fi # Output the missing server details if there are any. diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 007187ab85..f4caa5a7fa 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1160,7 +1160,7 @@ fn_info_game_col() { maxplayers="${maxplayers:-"0"}" port="${port:-"0"}" queryport="${port:-"0"}" - rcpassword="${rconpassword:-"NOT SET"}" + rconpassword="${rconpassword:-"NOT SET"}" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" steamport="${steamport:-"0"}" @@ -1174,11 +1174,11 @@ fn_info_game_cs2() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_valve_keyvalues "servername" "hostname" fn_info_game_valve_keyvalues "defaultmap" "map" - fn_info_game_valve_keyvalues "password" "sv_password" + fn_info_game_valve_keyvalues "serverpassword" "sv_password" fi defaultmap="${defaultmap:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" - password="${password:-"NOT SET"}" + serverpassword="${serverpassword:-"NOT SET"}" port="${port:-"0"}" queryport="${port:-"0"}" servername="${servername:-"NOT SET"}"