fixed forcespec exception
This commit is contained in:
parent
9898009a82
commit
7ba4aa0b7b
@ -184,7 +184,17 @@ class PlayerActions {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
$this->maniaControl->client->forceSpectator($target->login, $spectatorState);
|
$this->maniaControl->client->forceSpectator($target->login, $spectatorState);
|
||||||
|
} catch(Exception $e) {
|
||||||
|
if ($e->getMessage() == "There are too many spectators") {
|
||||||
|
$this->maniaControl->chat->sendError($e->getMessage(), $adminLogin);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
||||||
$chatMessage = $title . ' $<' . $admin->nickname . '$> forced $<' . $target->nickname . '$> to Spectator!';
|
$chatMessage = $title . ' $<' . $admin->nickname . '$> forced $<' . $target->nickname . '$> to Spectator!';
|
||||||
|
Loading…
Reference in New Issue
Block a user