error fixes

This commit is contained in:
kremsy
2014-03-13 18:47:40 +01:00
committed by Steffen Schröder
parent d3cc9db29c
commit 79a771583e
7 changed files with 66 additions and 33 deletions

View File

@ -352,7 +352,7 @@ class ChatMessagePlugin implements CommandListener, Plugin {
$this->maniaControl->chat->sendChat($msg, null, false);
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_AFK_FORCE_SPEC)) {
if($player->isSpectator){
if ($player->isSpectator) {
return;
}
@ -370,9 +370,11 @@ class ChatMessagePlugin implements CommandListener, Plugin {
try {
$this->maniaControl->client->spectatorReleasePlayerSlot($player->login);
} 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)
//to nothing
if ($e->getMessage() != 'The player is not a spectator') {
$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)
//to nothing
}
}
}
}