From dab6702db3d87e4a15cb8193bb41dad19ef64e1c Mon Sep 17 00:00:00 2001 From: Jan <31162382+AEon-Jan@users.noreply.github.com> Date: Wed, 22 Dec 2021 13:46:16 +0100 Subject: [PATCH] Update by Miike#6900 Fix suggested by our Discord community --- stuff/methods/class_masterserver.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/stuff/methods/class_masterserver.php b/stuff/methods/class_masterserver.php index a1db2a21..ec37e4c4 100644 --- a/stuff/methods/class_masterserver.php +++ b/stuff/methods/class_masterserver.php @@ -409,23 +409,21 @@ class masterServer { //Steam updater if ($row['steamgame'] == 'S') { - $this->shellScript .= 'cd /home/' . $this->sshuser . '/masterserver/steamCMD/'. "\n"; - - $this->shellScript .= 'taskset -c 0 ${IONICE}nice -n +19 ./steamcmd.sh +login '; - + $this->shellScript .= 'cd /home/' . $this->sshuser . '/masterserver/steamCMD/'. "\n"; + + $this->shellScript .= 'taskset -c 0 ${IONICE}nice -n +19 ./steamcmd.sh +force_install_dir ' . $absoluteGamePath . ' +login '; + if (strlen($this->steamAccount) > 0) { $this->shellScript .= $this->steamAccount . ' ' . $this->steamPassword; } else if (strlen($row['steamAcc']) > 0) { $this->shellScript .= $row['steamAcc'] . ' ' . $row['steamPwd']; } else { - $this->shellScript .= 'anonymous'; + $this->shellScript .= 'anonymous '; } - - $this->shellScript .= ' +force_install_dir ' . $absoluteGamePath . ' '; - + $fixedId = workAroundForValveChaos($row['appID'], $row['shorten'], false); - - $this->shellScript .= ($fixedId == 90) ? '+app_set_config 90 mod ' . $row['shorten'] . ' +app_update 90' : '+app_update ' . $fixedId; + + $this->shellScript .= ($fixedId == 90) ? ' +app_set_config 90 mod ' . $row['shorten'] . ' +app_update 90' : '+app_update ' . $fixedId; $this->shellScript .= ' validate +quit > ' . $updateLog . "\n"; } else if ($row['steamgame'] == 'N' and ($row['shorten'] == 'mc')) {