added ignore exception

This commit is contained in:
kremsy
2014-04-24 10:33:47 +02:00
committed by Steffen Schröder
parent 49cc059e66
commit 594694368b
2 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,7 @@ use ManiaControl\ManiaControl;
use ManiaControl\Manialinks\ManialinkManager;
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInTeamModeException;
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerAlreadyIgnoredException;
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerIsNotSpectatorException;
/**
@ -242,7 +243,10 @@ class PlayerActions {
return;
}
$this->maniaControl->client->ignore($targetLogin);
try{
$this->maniaControl->client->ignore($targetLogin);
}catch(PlayerAlreadyIgnoredException $e){
}
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
$chatMessage = $title . ' $<' . $admin->nickname . '$> muted $<' . $target->nickname . '$>!';