diff options
author | Melanie | 2012-03-05 22:22:28 +0100 |
---|---|---|
committer | Melanie | 2012-03-05 22:22:28 +0100 |
commit | a7b61add99bb7907ae054010232fd303f6ae739e (patch) | |
tree | 0b5bd10a13bc785c4c136436785fca45ddcc4f8b /OpenSim/Region | |
parent | Teleport users to the cornfield when they are teleported with (diff) | |
download | opensim-SC-a7b61add99bb7907ae054010232fd303f6ae739e.zip opensim-SC-a7b61add99bb7907ae054010232fd303f6ae739e.tar.gz opensim-SC-a7b61add99bb7907ae054010232fd303f6ae739e.tar.bz2 opensim-SC-a7b61add99bb7907ae054010232fd303f6ae739e.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2424130..a9b8e04 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2265,6 +2265,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2265 | 2265 | ||
2266 | string groupTitle = String.Empty; | 2266 | string groupTitle = String.Empty; |
2267 | 2267 | ||
2268 | if (!World.Permissions.CanRezObject(1, m_host.OwnerID, new Vector3((float)position.x, (float)position.y, (float)position.z))) | ||
2269 | return new LSL_Key(UUID.Zero.ToString()); | ||
2270 | |||
2268 | if (firstname != String.Empty || lastname != String.Empty) | 2271 | if (firstname != String.Empty || lastname != String.Empty) |
2269 | { | 2272 | { |
2270 | if (firstname != "Shown outfit:") | 2273 | if (firstname != "Shown outfit:") |
@@ -2594,8 +2597,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2594 | { | 2597 | { |
2595 | UUID npcId = new UUID(npc.m_string); | 2598 | UUID npcId = new UUID(npc.m_string); |
2596 | 2599 | ||
2597 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2600 | ILandObject l = World.LandChannel.GetLandObject(m_host.GroupPosition.X, m_host.GroupPosition.Y); |
2598 | return; | 2601 | if (l == null || m_host.OwnerID != l.LandData.OwnerID) |
2602 | { | ||
2603 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | ||
2604 | return; | ||
2605 | } | ||
2599 | 2606 | ||
2600 | module.DeleteNPC(npcId, World); | 2607 | module.DeleteNPC(npcId, World); |
2601 | } | 2608 | } |