permission levels

This commit is contained in:
kremsy
2014-01-31 16:55:01 +01:00
committed by Steffen Schröder
parent f825c0c111
commit aa642a7ef1
9 changed files with 154 additions and 87 deletions

View File

@ -144,8 +144,9 @@ class AuthenticationManager implements CallbackListener {
return false;
}
$authLevel = (int)$authLevel;
if ($authLevel >= self::AUTH_LEVEL_MASTERADMIN)
if ($authLevel >= self::AUTH_LEVEL_MASTERADMIN) {
return false;
}
$mysqli = $this->maniaControl->database->mysqli;
$authQuery = "INSERT INTO `" . PlayerManager::TABLE_PLAYERS . "` (
@ -182,9 +183,10 @@ class AuthenticationManager implements CallbackListener {
* @return bool
*/
public function sendNotAllowed(Player $player) {
if (!$player)
if (!$player) {
return false;
return $this->maniaControl->chat->sendError('You do not have the required Rights to perform this Command!', $player->login);
}
return $this->maniaControl->chat->sendError('You do not have the required Rights to perform this Action!', $player->login);
}
/**