some todo resolves
This commit is contained in:
committed by
Steffen Schröder
parent
5dcc8e865c
commit
7c4a038722
@ -87,6 +87,7 @@ class PlayerActions {
|
||||
$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);
|
||||
return;
|
||||
}
|
||||
@ -96,6 +97,7 @@ class PlayerActions {
|
||||
$this->maniaControl->client->forceSpectator($target->login, self::SPECTATOR_USER_SELECTABLE);
|
||||
} catch(Exception $e) {
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerActions Debug Line 100: " . $e->getMessage());
|
||||
$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $admin->login);
|
||||
return;
|
||||
}
|
||||
@ -178,6 +180,7 @@ class PlayerActions {
|
||||
try {
|
||||
$this->maniaControl->client->spectatorReleasePlayerSlot($target->login);
|
||||
} catch(Exception $e) {
|
||||
$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
|
||||
}
|
||||
@ -348,6 +351,7 @@ class PlayerActions {
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerActions Debug Line 354: " . $e->getMessage());
|
||||
$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $admin->login);
|
||||
return;
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca
|
||||
try {
|
||||
$this->maniaControl->client->autoTeamBalance();
|
||||
} catch(Exception $e) {
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerCommands Debug Line 110: " . $e->getMessage());
|
||||
// TODO: only catch 'not in team mode' exception - throw others (like connection error)
|
||||
$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $player->login);
|
||||
return;
|
||||
|
@ -650,6 +650,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
$this->maniaControl->client->forceSpectator($adminLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
|
||||
$this->maniaControl->client->forceSpectatorTarget($adminLogin, $targetLogin, 1);
|
||||
} catch(Exception $e) {
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerList Debug Line 653: " . $e->getMessage());
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
}
|
||||
break;
|
||||
@ -724,6 +725,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
} 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());
|
||||
}
|
||||
});
|
||||
break;
|
||||
@ -747,6 +749,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
try {
|
||||
$this->maniaControl->client->kick($target->login, $message);
|
||||
} catch(Exception $e) {
|
||||
$this->maniaControl->errorHandler->triggerDebugNotice("PlayerList Debug Line 751: " . $e->getMessage());
|
||||
// TODO: only possible valid exception should be "wrong login" - throw others (like connection error)
|
||||
$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $target->login);
|
||||
return;
|
||||
|
@ -20,7 +20,6 @@ class PlayerManager implements CallbackListener {
|
||||
*/
|
||||
const CB_PLAYERCONNECT = 'PlayerManagerCallback.PlayerConnect';
|
||||
const CB_PLAYERDISCONNECT = 'PlayerManagerCallback.PlayerDisconnect';
|
||||
const CB_ONINIT = 'PlayerManagerCallback.OnInit';
|
||||
const CB_PLAYERINFOCHANGED = 'PlayerManagerCallback.PlayerInfoChanged';
|
||||
const TABLE_PLAYERS = 'mc_players';
|
||||
const SETTING_JOIN_LEAVE_MESSAGES = 'Enable Join & Leave Messages';
|
||||
@ -135,10 +134,6 @@ class PlayerManager implements CallbackListener {
|
||||
$player->hasJoinedGame = true;
|
||||
$this->addPlayer($player);
|
||||
}
|
||||
|
||||
// Trigger own callback
|
||||
// TODO: what for?
|
||||
$this->maniaControl->callbackManager->triggerCallback(self::CB_ONINIT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user