player action weired exception fix
This commit is contained in:
parent
e5278e6987
commit
fc7b1bdade
@ -385,16 +385,22 @@ class PlayerActions {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if ($target->isFakePlayer()) {
|
||||
try {
|
||||
$this->maniaControl->getClient()->disconnectFakePlayer($target->login);
|
||||
} else {
|
||||
$this->maniaControl->getClient()->kick($target->login, $message);
|
||||
} catch (PlayerStateException $e) {
|
||||
$this->maniaControl->getChat()->sendException($e, $admin);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
$this->maniaControl->getClient()->kick($target->login, $message);
|
||||
} catch (UnknownPlayerException $e) {
|
||||
$this->maniaControl->getChat()->sendException($e, $admin);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Announce kick
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
|
Loading…
Reference in New Issue
Block a user