Skip to content

Commit

Permalink
Some fixes in the steamcmd installation.
Browse files Browse the repository at this point in the history
Needs agent update.
  • Loading branch information
DieFeM authored and DieFeM committed Mar 21, 2014
1 parent 8dc7143 commit 3d9a097
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions includes/lib_remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ public function steam($home_id,$game_home,$mod,$exec_folder_path,$exec_path,$pre
/// \return 1 If update started successfully
/// \return 0 If error
/// \return -1 In case of connection error.
public function steam_cmd($home_id,$game_home,$mod,$modname,$betaname,$betapwd,$user,$pass,$guard,$exec_folder_path,$exec_path,$precmd,$postcmd)
public function steam_cmd($home_id,$game_home,$mod,$modname,$betaname,$betapwd,$user,$pass,$guard,$exec_folder_path,$exec_path,$precmd,$postcmd,$cfg_os)
{
$params = $this->encrypt_params($home_id,$game_home,$mod,$modname,$betaname,$betapwd,$user,$pass,$guard,$exec_folder_path,$exec_path,$precmd,$postcmd);
$params = $this->encrypt_params($home_id,$game_home,$mod,$modname,$betaname,$betapwd,$user,$pass,$guard,$exec_folder_path,$exec_path,$precmd,$postcmd,$cfg_os);
$request = xmlrpc_encode_request("steam_cmd", $params);
$response = $this->sendRequest($request);

Expand Down
11 changes: 9 additions & 2 deletions modules/gamemanager/update_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ function exec_ogp_module() {
}
else
{
if( preg_match("/win32/", $server_xml->game_key) OR preg_match("/win64/", $server_xml->game_key) )
$cfg_os = "windows";
elseif( preg_match("/linux/", $server_xml->game_key) )
$cfg_os = "linux";

$settings = $db->getSettings();

// Some games like L4D2 require anonymous login
Expand All @@ -150,8 +155,10 @@ function exec_ogp_module() {
$modname = ( $installer_name == '90' and !preg_match("/(cstrike|valve)/", $modkey) ) ? $modkey : '';
$betaname = isset($mod_xml->betaname) ? $mod_xml->betaname : '';
$betapwd = isset($mod_xml->betapwd) ? $mod_xml->betapwd : '';

$steam_out = $remote->steam_cmd( $home_id,$home_info['home_path'],$installer_name,$modname,$betaname,$betapwd,$login,$pass,$settings['steam_guard'],$exec_folder_path,$exec_path,$precmd,$postcmd );

$steam_out = $remote->steam_cmd( $home_id,$home_info['home_path'],$installer_name,$modname,
$betaname,$betapwd,$login,$pass,$settings['steam_guard'],
$exec_folder_path,$exec_path,$precmd,$postcmd,$cfg_os );
}

if( $steam_out === 0 )
Expand Down

0 comments on commit 3d9a097

Please sign in to comment.