diff --git a/core/Configurator/ScriptSettings.php b/core/Configurator/ScriptSettings.php index d0b44d8e..78f82818 100644 --- a/core/Configurator/ScriptSettings.php +++ b/core/Configurator/ScriptSettings.php @@ -20,6 +20,7 @@ use ManiaControl\Communication\CommunicationMethods; use ManiaControl\Logger; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; +use Maniaplanet\DedicatedServer\Xmlrpc\FaultException; use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException; /** @@ -345,7 +346,12 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener, Communicatio return true; } - $this->maniaControl->getClient()->setModeScriptSettings($newSettings); + try { + $this->maniaControl->getClient()->setModeScriptSettings($newSettings); + } catch (FaultException $e) { + return false; + } + // Save Settings into Database $mysqli = $this->maniaControl->getDatabase()->getMysqli(); @@ -380,8 +386,6 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener, Communicatio } // Add To Database - $settingName = $setting; - $settingValue = $value; $statement->execute(); if ($statement->error) { trigger_error($statement->error); diff --git a/core/Manialinks/ManialinkManager.php b/core/Manialinks/ManialinkManager.php index e1ff5cd9..71200c87 100644 --- a/core/Manialinks/ManialinkManager.php +++ b/core/Manialinks/ManialinkManager.php @@ -8,10 +8,12 @@ use FML\Controls\Labels\Label_Text; use FML\ManiaLink; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; +use ManiaControl\Logger; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; use Maniaplanet\DedicatedServer\Xmlrpc\FaultException; use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException; +use Maniaplanet\DedicatedServer\Xmlrpc\MessageException; use Maniaplanet\DedicatedServer\Xmlrpc\UnknownPlayerException; /** @@ -266,6 +268,9 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener //TODO added 17.01.2015, remove later: $this->maniaControl->getErrorHandler()->triggerDebugNotice("Fault Exception: ManiaLink Manager, Message: " . $e->getMessage()); return false; + } catch (MessageException $e) { + //TODO verify why this can happen + Logger::logError("Request too large during opening Directory Browser"); } return true; diff --git a/core/Players/PlayerActions.php b/core/Players/PlayerActions.php index 11858164..15779189 100644 --- a/core/Players/PlayerActions.php +++ b/core/Players/PlayerActions.php @@ -258,6 +258,11 @@ class PlayerActions implements EchoListener, CommunicationListener { $this->maniaControl->getChat()->sendException($exception, $admin); } return false; + } catch (UnknownPlayerException $exception) { + if ($calledByAdmin) { + $this->maniaControl->getChat()->sendException($exception, $admin); + } + return false; } if ($userIsAbleToSelect) { @@ -555,6 +560,11 @@ class PlayerActions implements EchoListener, CommunicationListener { $this->maniaControl->getChat()->sendException($e, $admin); } return false; + } catch (UnknownPlayerException $e) { //TODO check why it's actually needed, but there was a crash at this place + if ($calledByAdmin) { + $this->maniaControl->getChat()->sendException($e, $admin); + } + return false; } } else { try {