The /admin config command now only works for moderators+

This commit is contained in:
Max Klaversma 2014-03-29 16:23:04 +01:00 committed by Steffen Schröder
parent 46bf05225e
commit b4bbfe6c72

View File

@ -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);
}