fixed exceptions
This commit is contained in:
committed by
Steffen Schröder
parent
689e572c62
commit
d3cc9db29c
@ -132,7 +132,16 @@ class PlayerActions {
|
||||
$this->forcePlayerToPlay($adminLogin, $targetLogin, true, false);
|
||||
}
|
||||
|
||||
$this->maniaControl->client->forcePlayerTeam($target->login, $teamId);
|
||||
try {
|
||||
$this->maniaControl->client->forcePlayerTeam($target->login, $teamId);
|
||||
} catch(Exception $e) {
|
||||
if ($e->getMessage() == "Not in Team mode.") {
|
||||
$this->forcePlayerToPlay($adminLogin, $targetLogin);
|
||||
return;
|
||||
} else {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$chatMessage = false;
|
||||
$title = $this->maniaControl->authenticationManager->getAuthLevelName($admin->authLevel);
|
||||
|
Reference in New Issue
Block a user