osSetParcelDetails: allow parcel group to be cleared also

0.9.0-post-fixes
UbitUmarov 2017-07-12 01:52:01 +01:00
parent c8a9b0321f
commit 3847f861e3
1 changed files with 15 additions and 7 deletions

View File

@ -1666,17 +1666,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
if(newLand.GroupID != uuid) if(newLand.GroupID != uuid)
{ {
IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface<IGroupsModule>(); if(uuid == UUID.Zero)
GroupMembershipData member = null;
if (groupsModule != null)
member = groupsModule.GetMembershipData(uuid, newLand.OwnerID);
if (member == null)
OSSLError(string.Format("land owner is not member of the new group for parcel"));
else
{ {
changed = true; changed = true;
newLand.GroupID = uuid; newLand.GroupID = uuid;
} }
else
{
IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface<IGroupsModule>();
GroupMembershipData member = null;
if (groupsModule != null)
member = groupsModule.GetMembershipData(uuid, newLand.OwnerID);
if (member == null)
OSSLError(string.Format("land owner is not member of the new group for parcel"));
else
{
changed = true;
newLand.GroupID = uuid;
}
}
} }
} }
} }