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.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-01-12 19:06:46 +00:00
parent 0a1d61950b
commit ba3491c76e
3 changed files with 52 additions and 25 deletions

View File

@@ -266,16 +266,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
return UUID.Zero;
}
public bool DeleteNPC(UUID agentID, UUID callerID, Scene scene)
public bool DeleteNPC(UUID agentID, Scene scene)
{
lock (m_avatars)
{
NPCAvatar av;
if (m_avatars.TryGetValue(agentID, out av))
{
if (!CheckPermissions(av, callerID));
return false;
scene.RemoveClient(agentID, false);
m_avatars.Remove(agentID);