aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-12 18:14:19 +0000
committerJustin Clark-Casey (justincc)2012-01-12 18:14:19 +0000
commitb47c0d7e51bdb4d4bfa34f0952593f94c657d19c (patch)
treeff869b0264b252f6246d0c8d76e41cfd856f17c3 /OpenSim/Region/ScriptEngine/Shared/Api
parentIf deserializing a scene object fails during IAR load then ignore the object ... (diff)
downloadopensim-SC-b47c0d7e51bdb4d4bfa34f0952593f94c657d19c.zip
opensim-SC-b47c0d7e51bdb4d4bfa34f0952593f94c657d19c.tar.gz
opensim-SC-b47c0d7e51bdb4d4bfa34f0952593f94c657d19c.tar.bz2
opensim-SC-b47c0d7e51bdb4d4bfa34f0952593f94c657d19c.tar.xz
refactor: Move existing npc owner checks to NPCModule.CheckPermissions() methods and expose on interface for external calls.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index e2a045b..1d7a210 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2152,11 +2152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2152 if (!UUID.TryParse(npc.m_string, out npcId)) 2152 if (!UUID.TryParse(npc.m_string, out npcId))
2153 return new LSL_Key(UUID.Zero.ToString()); 2153 return new LSL_Key(UUID.Zero.ToString());
2154 2154
2155 if (!npcModule.IsNPC(npcId, m_host.ParentGroup.Scene)) 2155 if (!npcModule.CheckPermissions(npcId, m_host.OwnerID))
2156 return new LSL_Key(UUID.Zero.ToString());
2157
2158 UUID ownerID = npcModule.GetOwner(npcId);
2159 if (ownerID != UUID.Zero && ownerID != m_host.OwnerID)
2160 return new LSL_Key(UUID.Zero.ToString()); 2156 return new LSL_Key(UUID.Zero.ToString());
2161 2157
2162 return SaveAppearanceToNotecard(npcId, notecard); 2158 return SaveAppearanceToNotecard(npcId, notecard);