CommunicationMethod SET_SERVER_OPTIONS sets the changed values also in database on call

This commit is contained in:
kremsy 2016-04-10 13:32:32 +02:00
parent 0397bd0006
commit ade276d17c
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,8 @@
##v0.16x### ##v0.16x###
# Additions # Additions
- updated mx links to https - updated mx links to https
# Changes
- CommunicationMethod SET_SERVER_OPTIONS sets the changed values also in database on call
###v0.163### ###v0.163###
#Additions #Additions

View File

@ -368,7 +368,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList
* @param Player $player * @param Player $player
* @return bool * @return bool
*/ */
private function applyNewServerOptions(ServerOptions $newServerOptions, Player $player) { private function applyNewServerOptions(ServerOptions $newServerOptions, $player = null) {
try { try {
$this->maniaControl->getClient()->setServerOptions($newServerOptions); $this->maniaControl->getClient()->setServerOptions($newServerOptions);
} catch (ServerOptionsException $exception) { } catch (ServerOptionsException $exception) {
@ -409,8 +409,9 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList
$this->fillUpMandatoryOptions($newServerOptions, $oldServerOptions); $this->fillUpMandatoryOptions($newServerOptions, $oldServerOptions);
try { try {
$success = $this->maniaControl->getClient()->setServerOptions($newServerOptions); $success = $this->applyNewServerOptions($newServerOptions);
} catch (ServerOptionsException $exception) { } catch (ServerOptionsException $exception) {
return new CommunicationAnswer($exception->getMessage(), true); return new CommunicationAnswer($exception->getMessage(), true);
} }