Use Chat::formatMessage in Server/*

This commit is contained in:
Alexander Nell
2020-06-02 17:30:30 +02:00
parent 5717589588
commit 9abadac932
5 changed files with 159 additions and 77 deletions

View File

@ -210,8 +210,8 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList
$loaded = false;
try {
$loaded = $this->maniaControl->getClient()->setServerOptions($newServerOptions);
} catch (ServerOptionsException $exception) {
$this->maniaControl->getChat()->sendExceptionToAdmins($exception);
} catch (ServerOptionsException $e) {
$this->maniaControl->getChat()->sendExceptionToAdmins($e);
}
if ($loaded) {
@ -371,8 +371,8 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList
private function applyNewServerOptions(ServerOptions $newServerOptions, $player = null) {
try {
$this->maniaControl->getClient()->setServerOptions($newServerOptions);
} catch (ServerOptionsException $exception) {
$this->maniaControl->getChat()->sendException($exception, $player);
} catch (ServerOptionsException $e) {
$this->maniaControl->getChat()->sendException($e, $player);
return false;
}