diff --git a/modules/gamemanager/server_monitor.php b/modules/gamemanager/server_monitor.php
index 98f9a4b8..29a01510 100644
--- a/modules/gamemanager/server_monitor.php
+++ b/modules/gamemanager/server_monitor.php
@@ -29,18 +29,6 @@ require_once("modules/config_games/server_config_parser.php");
require_once("includes/refreshed.php");
require_once('includes/lib_remote.php');
-if (!function_exists('game_monitor_log')) {
- function game_monitor_log($message, array $context = array())
- {
- $prefix = '[GameMonitor] ';
- if (!empty($context)) {
- $context_json = json_encode($context, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
- $message .= ' | context=' . $context_json;
- }
- error_log($prefix . $message);
- }
-}
-
function renderParam($param, $last_param, $param_access_enabled, $home_id)
{
global $db;
@@ -160,13 +148,7 @@ function get_sync_name($server_xml)
function exec_ogp_module() {
global $db, $settings, $loggedInUserInfo;
- $isAdminUser = $db->isAdmin( $_SESSION['user_id'] );
- game_monitor_log('Rendering game monitor', array(
- 'user_id' => $_SESSION['user_id'],
- 'is_admin' => $isAdminUser,
- 'get' => $_GET,
- ));
- echo "
". get_lang("game_monitor") ."
";
+ echo "". get_lang("game_monitor") ."
";
$refresh = new refreshed();
set_time_limit(0);
$stats_servers_online = 0;
@@ -188,7 +170,7 @@ $home_info = $db->getGameHomeWithoutMods($home_id);
$home_limit = $loggedInUserInfo["users_page_limit"];
}
- $isAdmin = $isAdminUser;
+ $isAdmin = $db->isAdmin( $_SESSION['user_id'] );
if ( $isAdmin )
{
@@ -210,12 +192,6 @@ $home_info = $db->getGameHomeWithoutMods($home_id);
if( $server_homes === FALSE )
{
- game_monitor_log('No server homes returned', array(
- 'user_id' => $_SESSION['user_id'],
- 'query_scope' => $isAdmin ? 'admin' : 'user_and_group',
- 'home_cfg_id' => $home_cfg_id,
- 'search' => $search_field,
- ));
// If there are no games, then there can not be any mods either.
if (!empty($search_field)) {
@@ -318,17 +294,8 @@ echo " isset($server_home['home_id']) ? $server_home['home_id'] : null,
- 'mod_id' => isset($server_home['mod_id']) ? $server_home['mod_id'] : null,
- 'ip' => isset($server_home['ip']) ? $server_home['ip'] : null,
- 'home_cfg_file' => isset($server_home['home_cfg_file']) ? $server_home['home_cfg_file'] : null,
- ));
if( ( $show_all or isset($_GET['home_cfg_id']) ) AND ( !isset($server_home['ip']) or !isset($server_home['mod_id']) ) ){
$j++;
- game_monitor_log('Skipping server home due to missing ip or mod_id', array(
- 'home_id' => $server_home['home_id']
- ));
continue;
}
// Count the number of servers.
@@ -385,12 +352,7 @@ echo " $server_home['home_id'],
- 'config_path' => $config_path
- ));
- $server_xml = read_server_config($config_path);
+ $server_xml = read_server_config(SERVER_CONFIG_LOCATION."/".$server_home['home_cfg_file']);
$mod = $server_home['mod_key'];
// If query name does not exist use mod key instead.
@@ -446,12 +408,6 @@ echo "status_chk();
- game_monitor_log('Agent status check', array(
- 'home_id' => $server_home['home_id'],
- 'agent_ip' => $server_home['agent_ip'],
- 'agent_port' => $server_home['agent_port'],
- 'status' => $host_stat
- ));
if( $host_stat === 1)
{
@@ -542,11 +498,6 @@ echo "Agent Offline";
- game_monitor_log('Agent offline', array(
- 'home_id' => $server_home['home_id'],
- 'agent_ip' => $server_home['agent_ip'],
- 'agent_port' => $server_home['agent_port']
- ));
}
$user = $db->getUserById($server_home['user_id_main']);
@@ -583,11 +534,6 @@ echo " $_SESSION['user_id'],
- 'total_servers' => $stats_servers,
- 'online_servers' => $stats_servers_online
- ));
echo "
@@ -637,7 +583,7 @@ echo "