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.
0.6.0-stable
Melanie Thielker 2008-07-18 18:08:34 +00:00
parent 449c09234d
commit 76840906b5
2 changed files with 13 additions and 0 deletions

View File

@ -34,5 +34,6 @@ namespace OpenSim.Region.Environment.Interfaces
public interface IEstateModule : IRegionModule public interface IEstateModule : IRegionModule
{ {
uint GetRegionFlags(); uint GetRegionFlags();
bool IsManager(LLUUID avatarID);
} }
} }

View File

@ -796,5 +796,17 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
return (uint)flags; return (uint)flags;
} }
public bool IsManager(LLUUID avatarID)
{
if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID)
return true;
List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers);
if(ems.Contains(avatarID))
return true;
return false;
}
} }
} }