exception fix
This commit is contained in:
parent
594694368b
commit
157a4347a4
@ -15,6 +15,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
|||||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInTeamModeException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\NotInTeamModeException;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerAlreadyIgnoredException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerAlreadyIgnoredException;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerIsNotSpectatorException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerIsNotSpectatorException;
|
||||||
|
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerNotIgnoredException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Player Actions Class
|
* Player Actions Class
|
||||||
@ -215,7 +216,12 @@ class PlayerActions {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
$this->maniaControl->client->unIgnore($targetLogin);
|
$this->maniaControl->client->unIgnore($targetLogin);
|
||||||
|
}catch(PlayerNotIgnoredException $e){
|
||||||
|
$this->maniaControl->chat->sendError("Player is not ignored!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
||||||
$chatMessage = $title . ' $<' . $admin->nickname . '$> un-muted $<' . $target->nickname . '$>!';
|
$chatMessage = $title . ' $<' . $admin->nickname . '$> un-muted $<' . $target->nickname . '$>!';
|
||||||
@ -246,6 +252,8 @@ class PlayerActions {
|
|||||||
try{
|
try{
|
||||||
$this->maniaControl->client->ignore($targetLogin);
|
$this->maniaControl->client->ignore($targetLogin);
|
||||||
}catch(PlayerAlreadyIgnoredException $e){
|
}catch(PlayerAlreadyIgnoredException $e){
|
||||||
|
$this->maniaControl->chat->sendError("Player already ignored!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
||||||
|
Loading…
Reference in New Issue
Block a user