Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor
commit
9a78281f82
|
@ -290,28 +290,16 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public bool HasGroupAccess(UUID avatar)
|
public bool HasGroupAccess(UUID avatar)
|
||||||
{
|
{
|
||||||
if ((LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup)
|
if (LandData.GroupID != UUID.Zero && (LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup)
|
||||||
{
|
{
|
||||||
IGroupsModule groupsModule =
|
ScenePresence sp;
|
||||||
m_scene.RequestModuleInterface<IGroupsModule>();
|
if (!m_scene.TryGetScenePresence(avatar, out sp))
|
||||||
|
return false;
|
||||||
|
|
||||||
List<UUID> agentGroups = new List<UUID>();
|
if (!sp.ControllingClient.IsGroupMember(LandData.GroupID))
|
||||||
if (groupsModule != null)
|
return false;
|
||||||
{
|
|
||||||
GroupMembershipData[] GroupMembership =
|
|
||||||
groupsModule.GetMembershipData(avatar);
|
|
||||||
|
|
||||||
if (GroupMembership != null)
|
return true;
|
||||||
{
|
|
||||||
for (int i = 0; i < GroupMembership.Length; i++)
|
|
||||||
{
|
|
||||||
if (LandData.GroupID == GroupMembership[i].GroupID)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue