Преглед изворни кода

fix(ohd): keep rconport from the config when Game.ini has no ListenPort (#5223)

fn_info_game_ohd overwrote rconport with ListenPort from Game.ini, and the stock Game.ini has none, so the server was started with -RconPort=0 instead of the configured 7778 and details showed RCON as 0. With RCON enabled, -RconPort=0 makes the server listen on a random port. Use ListenPort from Game.ini when it is set, otherwise keep rconport from the LinuxGSM config.
Daniel Gibbs пре 1 дан
родитељ
комит
df4c6722ce
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      lgsm/modules/info_game.sh

+ 2 - 2
lgsm/modules/info_game.sh

@@ -1674,11 +1674,11 @@ fn_info_game_nec() {
 fn_info_game_ohd() {
 	if [ -f "${servercfgfullpath}" ]; then
 		fn_info_game_ini rconenabled "bEnabled"
-		fn_info_game_ini rconport "ListenPort"
+		fn_info_game_ini rconlistenport "ListenPort"
 		fn_info_game_ini rconpassword "Password"
 	fi
 	rconenabled="${rconenabled:-"false"}"
-	rconport="${rconport:-"0"}"
+	rconport="${rconlistenport:-"${rconport:-"0"}"}"
 	rconpassword="${rconpassword:-"NOT SET"}"
 }