diff --git a/application/core/Players/PlayerCommands.php b/application/core/Players/PlayerCommands.php index efd95ec8..83418ffe 100644 --- a/application/core/Players/PlayerCommands.php +++ b/application/core/Players/PlayerCommands.php @@ -170,7 +170,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca public function command_Warn(array $chatCallback, Player $player) { $params = explode(' ', $chatCallback[1][2], 3); if (count($params) <= 1) { - $this->maniaControl->chat->sendUsageInfo("No Login given! Example: '//kick login'", $player->login); + $this->maniaControl->chat->sendUsageInfo("No Login given! Example: '//warn login'", $player->login); return; } $targetLogin = $params[1]; diff --git a/application/core/Players/PlayerDataManager.php b/application/core/Players/PlayerDataManager.php index bcf0fdc9..36c97bdd 100644 --- a/application/core/Players/PlayerDataManager.php +++ b/application/core/Players/PlayerDataManager.php @@ -207,7 +207,7 @@ class PlayerDataManager { if (is_array($param)) { return self::TYPE_ARRAY; } - trigger_error('Unsupported setting type. ' . print_r($param, true)); + trigger_error('Unsupported data type. ' . print_r($param, true)); return null; } @@ -358,7 +358,7 @@ class PlayerDataManager { if ($type === self::TYPE_ARRAY) { return explode($this->arrayDelimiter, $value); } - trigger_error('Unsupported setting type. ' . print_r($type, true)); + trigger_error('Unsupported data type. ' . print_r($type, true)); return $value; } } \ No newline at end of file diff --git a/application/plugins/MCTeam/ChatMessagePlugin.php b/application/plugins/MCTeam/ChatMessagePlugin.php index 328b453a..411da13a 100644 --- a/application/plugins/MCTeam/ChatMessagePlugin.php +++ b/application/plugins/MCTeam/ChatMessagePlugin.php @@ -7,6 +7,7 @@ use ManiaControl\ManiaControl; use ManiaControl\Players\Player; use ManiaControl\Plugins\Plugin; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; +use Maniaplanet\DedicatedServer\Xmlrpc\LoginUnknownException; /** * ManiaControl Chat-Message Plugin @@ -383,11 +384,8 @@ class ChatMessagePlugin implements CommandListener, Plugin { $message = '$39F Thanks for Playing, please come back soon!$z '; try { $this->maniaControl->client->kick($player->login, $message); - } catch (Exception $e) { - $this->maniaControl->errorHandler->triggerDebugNotice("ChatMessagePlugin Debug Line " . $e->getLine() . ": " . $e->getMessage()); - // TODO: only possible valid exception should be "wrong login" - throw others (like connection error) - $this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $player->login); - return; + } catch (LoginUnknownException $e) { + $this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $player); } }