error fixes
This commit is contained in:
committed by
Steffen Schröder
parent
d3cc9db29c
commit
79a771583e
@ -86,9 +86,14 @@ class PlayerActions {
|
||||
try {
|
||||
$this->maniaControl->client->forceSpectator($target->login, self::SPECTATOR_PLAYER);
|
||||
} catch(Exception $e) {
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerActions Debug Line 90: " . $e->getMessage());
|
||||
$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $admin->login);
|
||||
if ($e->getMessage() == 'There are too many players') {
|
||||
$this->maniaControl->chat->sendError("Too many Spectators");
|
||||
return;
|
||||
} else {
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerActions Debug Line 90: " . $e->getMessage());
|
||||
$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $admin->login);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -192,10 +197,11 @@ class PlayerActions {
|
||||
if ($e->getMessage() == 'The player is not a spectator') {
|
||||
$this->kickPlayer($adminLogin, $targetLogin, 'Disconnect');
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("inaktiv spec player kicked " . $e->getMessage());
|
||||
} else {
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerActions Debug Line 183: " . $e->getMessage());
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
//do nothing
|
||||
}
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerActions Debug Line 183: " . $e->getMessage());
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -723,9 +723,11 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
$this->maniaControl->client->forceSpectator($target->login, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
|
||||
$this->maniaControl->client->spectatorReleasePlayerSlot($target->login);
|
||||
} catch(Exception $e) {
|
||||
//do nothing
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerList Debug Line 727: " . $e->getMessage());
|
||||
if ($e->getMessage() != 'Login unknown.') {
|
||||
//do nothing
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerList Debug Line 727: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
Reference in New Issue
Block a user