mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user