Allow group lookup during tp / login to make restricting parcels to group
work.avinationmerge
parent
ee9aca9c52
commit
33c023bf6a
|
@ -294,8 +294,23 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
{
|
||||
ScenePresence sp;
|
||||
if (!m_scene.TryGetScenePresence(avatar, out sp))
|
||||
{
|
||||
IGroupsModule groupsModule = m_scene.RequestModuleInterface<IGroupsModule>();
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue