From b4bbfe6c720b406774b2e971b54528ddedb9df5a Mon Sep 17 00:00:00 2001 From: Max Klaversma Date: Sat, 29 Mar 2014 16:23:04 +0100 Subject: [PATCH] The /admin config command now only works for moderators+ --- application/core/Configurators/Configurator.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/core/Configurators/Configurator.php b/application/core/Configurators/Configurator.php index 361414bc..43ca8871 100644 --- a/application/core/Configurators/Configurator.php +++ b/application/core/Configurators/Configurator.php @@ -11,6 +11,7 @@ use FML\Controls\Quads\Quad_Icons64x64_1; use FML\Controls\Quads\Quad_UIConstruction_Buttons; use FML\ManiaLink; use FML\Script\Script; +use ManiaControl\Admin\AuthenticationManager; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Commands\CommandListener; @@ -97,6 +98,11 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn * @param array $callback */ public function handleConfigCommand(array $callback, Player $player) { + if(!$this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) { + $this->maniaControl->authenticationManager->sendNotAllowed($player); + return; + } + $this->showMenu($player); }