Allow NPC to be removed by the owner of the parcel they're over.
Don't allow NPC creation unless the prim owner has rez rights.avinationmerge
parent
f2653b9b8e
commit
a7b61add99
|
@ -2265,6 +2265,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
string groupTitle = String.Empty;
|
string groupTitle = String.Empty;
|
||||||
|
|
||||||
|
if (!World.Permissions.CanRezObject(1, m_host.OwnerID, new Vector3((float)position.x, (float)position.y, (float)position.z)))
|
||||||
|
return new LSL_Key(UUID.Zero.ToString());
|
||||||
|
|
||||||
if (firstname != String.Empty || lastname != String.Empty)
|
if (firstname != String.Empty || lastname != String.Empty)
|
||||||
{
|
{
|
||||||
if (firstname != "Shown outfit:")
|
if (firstname != "Shown outfit:")
|
||||||
|
@ -2594,8 +2597,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
UUID npcId = new UUID(npc.m_string);
|
UUID npcId = new UUID(npc.m_string);
|
||||||
|
|
||||||
|
ILandObject l = World.LandChannel.GetLandObject(m_host.GroupPosition.X, m_host.GroupPosition.Y);
|
||||||
|
if (l == null || m_host.OwnerID != l.LandData.OwnerID)
|
||||||
|
{
|
||||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
module.DeleteNPC(npcId, World);
|
module.DeleteNPC(npcId, World);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue