|
|
@@ -54,7 +54,7 @@ function reloadJobs($server_homes, $remote_servers)
|
|
|
$dayOfTheWeek = $parts[4];
|
|
|
unset($parts[0],$parts[1],$parts[2],$parts[3],$parts[4]);
|
|
|
$command = implode(" ", $parts);
|
|
|
- $retval = preg_match_all("/^%ACTION=(start|restart|stop)\|%\|(.*)$/", $command, $job_info );
|
|
|
+ $retval = preg_match_all("/^%ACTION=(start|restart|stop|steam_auto_update)\|%\|(.*)$/", $command, $job_info );
|
|
|
if($retval and !empty($job_info[1][0]))
|
|
|
{
|
|
|
//print_r($job_info);
|
|
|
@@ -74,6 +74,9 @@ function reloadJobs($server_homes, $remote_servers)
|
|
|
list($home_id, $ip, $port, $control_protocol,
|
|
|
$control_password, $control_type, $home_path) = $server_args;
|
|
|
break;
|
|
|
+ case 'steam_auto_update':
|
|
|
+ // TODO Something
|
|
|
+ break;
|
|
|
}
|
|
|
if(!isset($server_homes[$home_id."_".$ip."_".$port])) continue;
|
|
|
$jobsArray[$rhost_id][$jobId] = array( 'job' => $job,
|
|
|
@@ -95,7 +98,7 @@ function reloadJobs($server_homes, $remote_servers)
|
|
|
}
|
|
|
|
|
|
function get_action_selector($action = false) {
|
|
|
- $server_actions = array('restart','stop','start');
|
|
|
+ $server_actions = array('restart','stop','start','steam_auto_update');
|
|
|
$select_action = '<select style="width: 100px;" name="action">';
|
|
|
foreach($server_actions as $server_action)
|
|
|
{
|
|
|
@@ -112,9 +115,16 @@ function get_server_selector($server_homes, $homeid_ip_port = FALSE, $onchange =
|
|
|
{
|
|
|
foreach ( $server_homes as $server_home )
|
|
|
{
|
|
|
+ // Find out if it's a steamcmd server
|
|
|
+ $additionalMarkup = "";
|
|
|
+ $server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$server_home['home_cfg_file']);
|
|
|
+ if( $server_xml->installer == "steamcmd" ){
|
|
|
+ $additionalMarkup = 'steam="1"';
|
|
|
+ }
|
|
|
+
|
|
|
$selected = ($homeid_ip_port and $homeid_ip_port == $server_home['home_id']."_".$server_home['ip']."_".$server_home['port']) ? 'selected="selected"' : '';
|
|
|
$select_game .= "<option value='". $server_home['home_id'] . "_" . $server_home['ip'] .
|
|
|
- "_" . $server_home['port'] . "' $selected>" . $server_home['home_name'] .
|
|
|
+ "_" . $server_home['port'] . "' $selected " . $additionalMarkup . ">" . $server_home['home_name'] .
|
|
|
" - " . $server_home['ip'] . ":" .$server_home['port'] . "</option>\n";
|
|
|
}
|
|
|
}
|
|
|
@@ -211,6 +221,9 @@ function exec_ogp_module()
|
|
|
"$control_password|%|$control_type|%|$home_path|%|$server_exe|%|$run_dir|%|".
|
|
|
"$startup_cmd|%|$cpu|%|$nice";
|
|
|
break;
|
|
|
+ case "steam_auto_update":
|
|
|
+ // TODO Something
|
|
|
+ break;
|
|
|
}
|
|
|
$job = $_POST['minute']." ".
|
|
|
$_POST['hour']." ".
|