From 76840906b596fb2c9e6225997c21923dc619953c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 18 Jul 2008 18:08:34 +0000 Subject: [PATCH] Patch adds bool IsManager(LLUUID) to IEstateModule. Returns true whenever the LLUUID references a user who is either an EM or the region owner. Please note that ownership is region-scoped, while EM is estate-scoped. --- .../Region/Environment/Interfaces/IEstateModule.cs | 1 + .../Modules/World/Estate/EstateManagementModule.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/OpenSim/Region/Environment/Interfaces/IEstateModule.cs b/OpenSim/Region/Environment/Interfaces/IEstateModule.cs index 070b804d0a..bfe3591b08 100644 --- a/OpenSim/Region/Environment/Interfaces/IEstateModule.cs +++ b/OpenSim/Region/Environment/Interfaces/IEstateModule.cs @@ -34,5 +34,6 @@ namespace OpenSim.Region.Environment.Interfaces public interface IEstateModule : IRegionModule { uint GetRegionFlags(); + bool IsManager(LLUUID avatarID); } } diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index c5c0370e58..f2b6ae0107 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs @@ -796,5 +796,17 @@ namespace OpenSim.Region.Environment.Modules.World.Estate return (uint)flags; } + + public bool IsManager(LLUUID avatarID) + { + if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID) + return true; + + List ems = new List(m_scene.RegionInfo.EstateSettings.EstateManagers); + if(ems.Contains(avatarID)) + return true; + + return false; + } } }