From 33c023bf6a0dc5445b6ccbecfff080032f279f2e Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 25 Nov 2010 21:22:22 +0100 Subject: Allow group lookup during tp / login to make restricting parcels to group work. --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index d0517b7..d596887 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -294,7 +294,22 @@ namespace OpenSim.Region.CoreModules.World.Land { ScenePresence sp; if (!m_scene.TryGetScenePresence(avatar, out sp)) + { + IGroupsModule groupsModule = m_scene.RequestModuleInterface(); + if (groupsModule == null) + return false; + + GroupMembershipData[] membership = groupsModule.GetMembershipData(avatar); + if (membership == null || membership.Length == 0) + return false; + + foreach (GroupMembershipData d in membership) + { + if (d.GroupID == LandData.GroupID) + return true; + } return false; + } if (!sp.ControllingClient.IsGroupMember(LandData.GroupID)) return false; -- cgit v1.1