Work on TerritoryAccess and permissions.

This commit is contained in:
Olof Larsson
2013-04-29 12:48:11 +02:00
parent 3a6bca872f
commit 709c1fe80d
12 changed files with 132 additions and 189 deletions

View File

@@ -39,7 +39,7 @@ public class CmdFactionsClaim extends FCommand
if (forFaction == null) return;
// FPerm
if (forFaction.isNormal() && !FPerm.TERRITORY.has(sender, forFaction, true)) return;
if (forFaction.isNormal() && !FPerm.TERRITORY.has(usender, forFaction, true)) return;
// Validate
if (radius < 1)

View File

@@ -36,7 +36,7 @@ public class CmdFactionsDisband extends FCommand
if (faction == null) return;
// FPerm
if ( ! FPerm.DISBAND.has(sender, faction, true)) return;
if ( ! FPerm.DISBAND.has(usender, faction, true)) return;
// Verify
if (faction.getFlag(FFlag.PERMANENT))

View File

@@ -46,7 +46,7 @@ public class CmdFactionsInvite extends FCommand
}
// FPerm
if ( ! FPerm.INVITE.has(sender, usenderFaction, true)) return;
if ( ! FPerm.INVITE.has(usender, usenderFaction, true)) return;
// Event
FactionsEventInvitedChange event = new FactionsEventInvitedChange(sender, uplayer, usenderFaction, newInvited);

View File

@@ -57,7 +57,7 @@ public class CmdFactionsKick extends FCommand
// FPerm
Faction uplayerFaction = uplayer.getFaction();
if (!FPerm.KICK.has(sender, uplayerFaction, true)) return;
if (!FPerm.KICK.has(usender, uplayerFaction, true)) return;
// Event
FactionsEventMembershipChange event = new FactionsEventMembershipChange(sender, uplayer, FactionColls.get().get(uplayer).getNone(), MembershipChangeReason.KICK);

View File

@@ -57,7 +57,7 @@ public class CmdFactionsPerm extends FCommand
}
// Do the sender have the right to change perms for this faction?
if ( ! FPerm.PERMS.has(sender, faction, true)) return;
if ( ! FPerm.PERMS.has(usender, faction, true)) return;
Rel rel = this.arg(2, ARRel.get());
if (rel == null) return;

View File

@@ -42,7 +42,7 @@ public class CmdFactionsSethome extends FCommand
}
// FPerm
if ( ! FPerm.SETHOME.has(sender, faction, true)) return;
if ( ! FPerm.SETHOME.has(usender, faction, true)) return;
// Verify
if (!usender.isUsingAdminMode() && !faction.isValidHome(newHome))

View File

@@ -30,7 +30,7 @@ public class CmdFactionsUnclaim extends FCommand
Faction newFaction = FactionColls.get().get(me).getNone();
// FPerm
if (!FPerm.TERRITORY.has(sender, usenderFaction, true)) return;
if (!FPerm.TERRITORY.has(usender, usenderFaction, true)) return;
// Apply
if (usender.tryClaim(newFaction, chunk, true, true)) return;

View File

@@ -38,7 +38,7 @@ public class CmdFactionsUnclaimall extends FCommand
Faction newFaction = FactionColls.get().get(faction).getNone();
// FPerm
if (!FPerm.TERRITORY.has(sender, faction, true)) return;
if (!FPerm.TERRITORY.has(usender, faction, true)) return;
// Apply
BoardColl boardColl = BoardColls.get().get(faction);