diff options
author | Justin Clark-Casey (justincc) | 2012-01-12 18:14:19 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-12 18:14:19 +0000 |
commit | b47c0d7e51bdb4d4bfa34f0952593f94c657d19c (patch) | |
tree | ff869b0264b252f6246d0c8d76e41cfd856f17c3 /OpenSim/Region/ScriptEngine | |
parent | If deserializing a scene object fails during IAR load then ignore the object ... (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 |
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); |