aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-12 19:06:46 +0000
committerJustin Clark-Casey (justincc)2012-01-12 19:06:46 +0000
commitba3491c76e2d7cc7187a025dccd782790929f0b7 (patch)
treeda28906958e7a557b8fd3f7b8cf86fe1a80d50f7 /OpenSim/Region/OptionalModules/World/NPC
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-ba3491c76e2d7cc7187a025dccd782790929f0b7.zip
opensim-SC_OLD-ba3491c76e2d7cc7187a025dccd782790929f0b7.tar.gz
opensim-SC_OLD-ba3491c76e2d7cc7187a025dccd782790929f0b7.tar.bz2
opensim-SC_OLD-ba3491c76e2d7cc7187a025dccd782790929f0b7.tar.xz
Add permissions checks for owned avatars to all other osNpc* functions.
This is being done outside the npc module since the check is meaningless for region module callers, who can fake any id that they like.
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 8f9b513..d90309f 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -266,16 +266,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
266 return UUID.Zero; 266 return UUID.Zero;
267 } 267 }
268 268
269 public bool DeleteNPC(UUID agentID, UUID callerID, Scene scene) 269 public bool DeleteNPC(UUID agentID, Scene scene)
270 { 270 {
271 lock (m_avatars) 271 lock (m_avatars)
272 { 272 {
273 NPCAvatar av; 273 NPCAvatar av;
274 if (m_avatars.TryGetValue(agentID, out av)) 274 if (m_avatars.TryGetValue(agentID, out av))
275 { 275 {
276 if (!CheckPermissions(av, callerID));
277 return false;
278
279 scene.RemoveClient(agentID, false); 276 scene.RemoveClient(agentID, false);
280 m_avatars.Remove(agentID); 277 m_avatars.Remove(agentID);
281 278