From 98b5f132dc9b16cd4d5153cbdb3878dc2c5bffe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 5 Aug 2014 02:08:41 +0200 Subject: [PATCH] adjusted logging calls to new parameter order and count --- .../core/Configurator/ScriptSettings.php | 2 +- application/core/ManiaControl.php | 2 +- application/core/Maps/DirectoryBrowser.php | 2 +- application/core/Maps/MapCommands.php | 10 +++++----- application/core/Maps/MapList.php | 2 +- application/core/Maps/MapManager.php | 8 ++++---- application/core/Maps/MapQueue.php | 2 +- application/core/Players/PlayerActions.php | 18 +++++++++--------- application/core/Players/PlayerManager.php | 4 ++-- application/core/Plugins/PluginMenu.php | 4 ++-- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/application/core/Configurator/ScriptSettings.php b/application/core/Configurator/ScriptSettings.php index 0a0efdf5..59cc8937 100644 --- a/application/core/Configurator/ScriptSettings.php +++ b/application/core/Configurator/ScriptSettings.php @@ -390,7 +390,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener { $chatMessage .= '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); return true; } diff --git a/application/core/ManiaControl.php b/application/core/ManiaControl.php index 41a151af..2dfcbc23 100644 --- a/application/core/ManiaControl.php +++ b/application/core/ManiaControl.php @@ -181,7 +181,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener { * @see Logger::log() */ public function log($message, $stripCodes = false) { - Logger::log($message, true, true, $stripCodes); + Logger::log($message, $stripCodes); } /** diff --git a/application/core/Maps/DirectoryBrowser.php b/application/core/Maps/DirectoryBrowser.php index ac6e0ade..8d4274e9 100644 --- a/application/core/Maps/DirectoryBrowser.php +++ b/application/core/Maps/DirectoryBrowser.php @@ -400,7 +400,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { // Message $message = $player->getEscapedNickname() . ' added ' . $map->getEscapedName() . '!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); // Queue requested Map $this->maniaControl->getMapManager()->getMapQueue()->addMapToMapQueue($player, $map); diff --git a/application/core/Maps/MapCommands.php b/application/core/Maps/MapCommands.php index 270a96e0..3aa31783 100644 --- a/application/core/Maps/MapCommands.php +++ b/application/core/Maps/MapCommands.php @@ -222,7 +222,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb $message = $player->getEscapedNickname() . ' skipped the current Map!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); } /** @@ -238,7 +238,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb } $message = $player->getEscapedNickname() . ' restarted the current Map!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); try { $this->maniaControl->getClient()->restartMap(); @@ -260,7 +260,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb } $message = $player->getEscapedNickname() . ' replays the current Map!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); $this->maniaControl->getMapManager()->getMapQueue()->addFirstMapToMapQueue($player, $this->maniaControl->getMapManager()->getCurrentMap()); } @@ -294,7 +294,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb $message = 'Maplist $<$fff' . $maplist . '$> written.'; $this->maniaControl->getChat()->sendSuccess($message, $player); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); } catch (FaultException $e) { $this->maniaControl->getChat()->sendError('Cannot write maplist $<$fff' . $maplist . '$>!', $player); } @@ -330,7 +330,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb $message = 'Maplist $<$fff' . $maplist . '$> loaded.'; $this->maniaControl->getMapManager()->restructureMapList(); $this->maniaControl->getChat()->sendSuccess($message, $player); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); } catch (FaultException $e) { $this->maniaControl->getChat()->sendError('Cannot load maplist $<$fff' . $maplist . '$>!', $player); } diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index b0bd450d..3f721714 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -655,7 +655,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $message = $player->getEscapedNickname() . ' skipped to Map $z' . $map->getEscapedName() . '!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); $this->playerCloseWidget($player); break; diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 625ccce3..acf40532 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -316,7 +316,7 @@ class MapManager implements CallbackListener { $action = ($eraseFile ? 'erased' : 'removed'); $message = $admin->getEscapedNickname() . ' ' . $action . ' ' . $map->getEscapedName() . '!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); } } @@ -446,13 +446,13 @@ class MapManager implements CallbackListener { // Message $message = $player->getEscapedNickname() . ' added $<' . $mapInfo->name . '$>!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); // Queue requested Map $this->maniaControl->getMapManager()->getMapQueue()->addMapToMapQueue($login, $mapInfo->uid); } else { $message = $player->getEscapedNickname() . ' updated $<' . $mapInfo->name . '$>!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); } } @@ -603,7 +603,7 @@ class MapManager implements CallbackListener { if ($admin) { $message = $admin->getEscapedNickname() . ' shuffled the Maplist!'; $this->maniaControl->getChat()->sendSuccess($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); } // Restructure if needed diff --git a/application/core/Maps/MapQueue.php b/application/core/Maps/MapQueue.php index e6ae2a32..84bce1a1 100644 --- a/application/core/Maps/MapQueue.php +++ b/application/core/Maps/MapQueue.php @@ -125,7 +125,7 @@ class MapQueue implements CallbackListener, CommandListener { $message = '$fa0' . $title . ' $<$fff' . $admin->nickname . '$> cleared the Map-Queue!'; $this->maniaControl->getChat()->sendInformation($message); - Logger::logInfo($message, true, true, true); + Logger::logInfo($message, true); // Trigger callback $this->maniaControl->getCallbackManager()->triggerCallback(self::CB_MAPQUEUE_CHANGED, array('clear')); diff --git a/application/core/Players/PlayerActions.php b/application/core/Players/PlayerActions.php index fbb98de0..94028468 100644 --- a/application/core/Players/PlayerActions.php +++ b/application/core/Players/PlayerActions.php @@ -118,7 +118,7 @@ class PlayerActions { return; } $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** @@ -197,7 +197,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' forced ' . $target->getEscapedNickname(). ' to Spectator!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); if ($releaseSlot) { // Free player slot @@ -238,7 +238,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname() . ' un-muted ' . $target->getEscapedNickname(). '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** @@ -270,7 +270,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' muted ' . $target->getEscapedNickname(). '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** @@ -352,7 +352,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' warned ' . $target->getEscapedNickname(). '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::log($chatMessage, true, true); + Logger::log($chatMessage, true); } /** @@ -388,7 +388,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname() . ' kicked ' . $target->getEscapedNickname() . '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** @@ -420,7 +420,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' banned ' . $target->getEscapedNickname(). '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** @@ -458,7 +458,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' added ' . $target->getEscapedNickname(). ' as $< ' . $authLevelName . '$>!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** @@ -495,7 +495,7 @@ class PlayerActions { $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' revoked the Rights of ' . $target->getEscapedNickname(). '!'; $this->maniaControl->getChat()->sendInformation($chatMessage); - Logger::logInfo($chatMessage, true, true, true); + Logger::logInfo($chatMessage, true); } /** diff --git a/application/core/Players/PlayerManager.php b/application/core/Players/PlayerManager.php index 8f5ef517..7f94949c 100644 --- a/application/core/Players/PlayerManager.php +++ b/application/core/Players/PlayerManager.php @@ -319,7 +319,7 @@ class PlayerManager implements CallbackListener, TimerListener { $played = Formatter::formatTimeH(time() - $player->joinTime); $logMessage = "Player left: {$player->login} / {$player->nickname} Playtime: {$played}"; - Logger::logInfo($logMessage, true, true, true); + Logger::logInfo($logMessage, true); if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_JOIN_LEAVE_MESSAGES)) { $this->maniaControl->getChat()->sendChat('$0f0$<$fff' . $player->nickname . '$> has left the game'); @@ -417,7 +417,7 @@ class PlayerManager implements CallbackListener, TimerListener { } $logMessage = "Player joined: {$player->login} / {$player->nickname} Nation: " . $player->getCountry() . " IP: {$player->ipAddress}"; - Logger::logInfo($logMessage, true, true, true); + Logger::logInfo($logMessage, true); // Increment the Player Join Count $this->maniaControl->getStatisticManager()->incrementStat(self::STAT_JOIN_COUNT, $player, $this->maniaControl->getServer()->index); diff --git a/application/core/Plugins/PluginMenu.php b/application/core/Plugins/PluginMenu.php index 585bed5b..0fd6a9eb 100644 --- a/application/core/Plugins/PluginMenu.php +++ b/application/core/Plugins/PluginMenu.php @@ -367,7 +367,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns $activated = $this->maniaControl->getPluginManager()->activatePlugin($pluginClass, $player->login); if ($activated) { $this->maniaControl->getChat()->sendSuccess($pluginClass::getName() . ' activated!', $player); - Logger::logInfo("{$player->login} activated '{$pluginClass}'!", true, true, true); + Logger::logInfo("{$player->login} activated '{$pluginClass}'!", true); } else { $this->maniaControl->getChat()->sendError('Error activating ' . $pluginClass::getName() . '!', $player); } @@ -377,7 +377,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns $deactivated = $this->maniaControl->getPluginManager()->deactivatePlugin($pluginClass); if ($deactivated) { $this->maniaControl->getChat()->sendSuccess($pluginClass::getName() . ' deactivated!', $player); - Logger::logInfo("{$player->login} deactivated '{$pluginClass}'!", true, true, true); + Logger::logInfo("{$player->login} deactivated '{$pluginClass}'!", true); } else { $this->maniaControl->getChat()->sendError('Error deactivating ' . $pluginClass::getName() . '!', $player); }