allow to remove rights to themself
This commit is contained in:
parent
0f55bff6c2
commit
bff16f6441
@ -154,7 +154,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($target->authLevel >= AuthenticationManager::AUTH_LEVEL_MASTERADMIN) {
|
if ($player !== $target && $target->authLevel >= AuthenticationManager::AUTH_LEVEL_MASTERADMIN) {
|
||||||
$this->maniaControl->getChat()->sendError('You cannot remove rights of a MasterAdmin!', $player);
|
$this->maniaControl->getChat()->sendError('You cannot remove rights of a MasterAdmin!', $player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($player->authLevel <= $target->authLevel) {
|
if ($player !== $target && $player->authLevel <= $target->authLevel) {
|
||||||
$this->maniaControl->getChat()->sendError('You cannot remove rights of a higher privileged player!', $player);
|
$this->maniaControl->getChat()->sendError('You cannot remove rights of a higher privileged player!', $player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user