Procházet zdrojové kódy

fix(sdtd): read telnet password into telnetpassword (#4968)

fn_info_game_sdtd stored TelnetPassword in ${telnetpass}, but
command_stop.sh, info_messages.sh and the localhost check in the same
function all read ${telnetpassword}. The graceful telnet shutdown never
sent the password, and the telnet IP was always forced to 127.0.0.1,
so stop fell back to killing the tmux session without a world save.

Fixes #4957

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Daniel Gibbs před 2 týdny
rodič
revize
1455800117
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      lgsm/modules/info_game.sh

+ 2 - 2
lgsm/modules/info_game.sh

@@ -1960,7 +1960,7 @@ fn_info_game_sdtd() {
 		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 "telnetpassword" "/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
@@ -1980,7 +1980,7 @@ fn_info_game_sdtd() {
 	if [ -z "${telnetpassword}" ]; then
 		telnetip="127.0.0.1"
 	fi
-	telnetpass="${telnetpass:-"NOT SET"}"
+	telnetpassword="${telnetpassword:-"NOT SET"}"
 	telnetport="${telnetport:-"0"}"
 	worldname="${worldname:-"NOT SET"}"