Major f perm fix; Fix sethome permission check (#1079)

This commit is contained in:
Dariasc
2018-03-09 15:22:15 -03:00
committed by Trent Hensler
parent 693c831327
commit 819cb542cd
6 changed files with 28 additions and 32 deletions

View File

@@ -45,15 +45,16 @@ public class CmdSethome extends FCommand {
return;
}
// Can the player set the home for this faction?
// Check for ALLOW access as well before we check for role.
if (faction == myFaction && access != Access.ALLOW) {
if (!Permission.SETHOME_ANY.has(sender, true) || !assertMinRole(Role.MODERATOR)) {
return;
}
} else {
if (!Permission.SETHOME_ANY.has(sender, true)) {
return;
// If player does not have allow run extra permission checks
if (access != Access.ALLOW) {
if (faction == myFaction) {
if (!assertMinRole(Role.MODERATOR)) {
return;
}
} else {
if (!Permission.SETHOME_ANY.has(sender, true)) {
return;
}
}
}