From 1fc2d567cf11f023d9a662969961f43fdb2f8377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sun, 22 Jun 2014 18:42:40 +0200 Subject: [PATCH] resolved todo --- application/core/Players/PlayerCommands.php | 10 ++++------ application/core/Plugins/PluginInstallMenu.php | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/application/core/Players/PlayerCommands.php b/application/core/Players/PlayerCommands.php index 2258f6f0..f12f8012 100644 --- a/application/core/Players/PlayerCommands.php +++ b/application/core/Players/PlayerCommands.php @@ -10,7 +10,7 @@ use ManiaControl\Commands\CommandListener; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Server\Server; -use Maniaplanet\DedicatedServer\Xmlrpc\Exception; +use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException; /** * Class offering various Admin Commands related to Players @@ -103,14 +103,12 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca try { $this->maniaControl->client->autoTeamBalance(); - } catch (Exception $e) { - $this->maniaControl->errorHandler->triggerDebugNotice("PlayerCommands Debug Line 112: " . $e->getMessage()); - // TODO: only catch 'not in team mode' exception - throw others (like connection error) - $this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $player->login); + } catch (GameModeException $exception) { + $this->maniaControl->chat->sendException($exception, $player); return; } - $this->maniaControl->chat->sendInformation('$<' . $player->nickname . '$> balanced Teams!'); + $this->maniaControl->chat->sendInformation($player->getEscapedNickname() . ' balanced Teams!'); } /** diff --git a/application/core/Plugins/PluginInstallMenu.php b/application/core/Plugins/PluginInstallMenu.php index cd125ae1..df186fba 100644 --- a/application/core/Plugins/PluginInstallMenu.php +++ b/application/core/Plugins/PluginInstallMenu.php @@ -243,7 +243,6 @@ class PluginInstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener * @see \ManiaControl\Configurators\ConfiguratorMenu::saveConfigData() */ public function saveConfigData(array $configData, Player $player) { - // TODO: Implement saveConfigData() method. } /**