log file patch
This commit is contained in:
parent
d96f843efe
commit
bcf2fdf239
5 changed files with 23 additions and 8 deletions
|
|
@ -20,8 +20,15 @@ $remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$
|
||||||
|
|
||||||
$home_log = "";
|
$home_log = "";
|
||||||
if( isset( $server_xml->console_log ) ) {
|
if( isset( $server_xml->console_log ) ) {
|
||||||
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], $server_xml->console_log);
|
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], (string)$server_xml->console_log);
|
||||||
$log_retval = $remote->remote_readfile( $home_info['home_path'].'/'.$log_path, $home_log );
|
$log_retval = $remote->get_log(
|
||||||
|
OGP_SCREEN_TYPE_HOME,
|
||||||
|
$home_info['home_id'],
|
||||||
|
clean_path($home_info['home_path']),
|
||||||
|
$home_log,
|
||||||
|
100,
|
||||||
|
$log_path
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME, $home_info['home_id'], clean_path($home_info['home_path']."/".$server_xml->exe_location), $home_log);
|
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME, $home_info['home_id'], clean_path($home_info['home_path']."/".$server_xml->exe_location), $home_log);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,11 @@ require_once("modules/config_games/server_config_parser.php");
|
||||||
|
|
||||||
if( isset( $server_xml->console_log ) )
|
if( isset( $server_xml->console_log ) )
|
||||||
{
|
{
|
||||||
|
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], (string)$server_xml->console_log);
|
||||||
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
|
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
|
||||||
$home_info['home_id'],
|
$home_info['home_id'],
|
||||||
clean_path($home_info['home_path']),
|
clean_path($home_info['home_path']),
|
||||||
$home_log, 100, (string) $server_xml->console_log);
|
$home_log, 100, $log_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,11 @@ function exec_ogp_module() {
|
||||||
{
|
{
|
||||||
if( isset( $server_xml->console_log ) )
|
if( isset( $server_xml->console_log ) )
|
||||||
{
|
{
|
||||||
$log_path = preg_replace("/mod/", $home_info['mods'][$mod_id]['mod_key'], $server_xml->console_log);
|
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], (string)$server_xml->console_log);
|
||||||
$log_retval = $remote->remote_readfile( $home_info['home_path'].'/'.$log_path, $home_log );
|
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
|
||||||
|
$home_info['home_id'],
|
||||||
|
clean_path($home_info['home_path']),
|
||||||
|
$home_log, 100, $log_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,11 @@ function exec_ogp_module()
|
||||||
|
|
||||||
if( isset( $server_xml->console_log ) )
|
if( isset( $server_xml->console_log ) )
|
||||||
{
|
{
|
||||||
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], $server_xml->console_log);
|
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], (string)$server_xml->console_log);
|
||||||
$log_retval = $remote->remote_readfile( $home_info['home_path'].'/'.$log_path, $home_log );
|
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
|
||||||
|
$home_info['home_id'],
|
||||||
|
clean_path($home_info['home_path']),
|
||||||
|
$home_log, 100, $log_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,11 @@ function exec_ogp_module()
|
||||||
|
|
||||||
if( isset( $server_xml->console_log ) )
|
if( isset( $server_xml->console_log ) )
|
||||||
{
|
{
|
||||||
|
$log_path = preg_replace("/%mod%/i", $home_info['mods'][$mod_id]['mod_key'], (string)$server_xml->console_log);
|
||||||
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
|
$log_retval = $remote->get_log(OGP_SCREEN_TYPE_HOME,
|
||||||
$home_info['home_id'],
|
$home_info['home_id'],
|
||||||
clean_path($home_info['home_path']),
|
clean_path($home_info['home_path']),
|
||||||
$home_log, 100, (string) $server_xml->console_log);
|
$home_log, 100, $log_path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue