improved message texts

This commit is contained in:
Steffen Schröder
2014-05-09 13:00:04 +02:00
parent 350e82d32b
commit 1e93aafd63
3 changed files with 6 additions and 8 deletions

View File

@ -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);
}
}