exception add on player ban

This commit is contained in:
kremsy 2015-01-12 13:20:21 +01:00
parent b5eca8d59b
commit 6068ed1ec1

View File

@ -427,7 +427,13 @@ class PlayerActions {
return; return;
} }
try {
$this->maniaControl->getClient()->ban($target->login, $message); $this->maniaControl->getClient()->ban($target->login, $message);
} catch (UnknownPlayerException $e) {
$this->maniaControl->getChat()->sendError('Unknown player!', $admin);
return;
}
// Announce ban // Announce ban
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel); $title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);