aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 95e59ab..b834619 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -441,13 +441,20 @@ namespace OpenSim.Region.OptionalModules.World.NPC
441 /// <summary> 441 /// <summary>
442 /// Check if the caller has permission to manipulate the given NPC. 442 /// Check if the caller has permission to manipulate the given NPC.
443 /// </summary> 443 /// </summary>
444 /// <remarks>
445 /// A caller has permission if
446 /// * The caller UUID given is UUID.Zero.
447 /// * The avatar is unowned (owner is UUID.Zero).
448 /// * The avatar is owned and the owner and callerID match.
449 /// * The avatar is owned and the callerID matches its agentID.
450 /// </remarks>
444 /// <param name="av"></param> 451 /// <param name="av"></param>
445 /// <param name="callerID"></param> 452 /// <param name="callerID"></param>
446 /// <returns>true if they do, false if they don't.</returns> 453 /// <returns>true if they do, false if they don't.</returns>
447 private bool CheckPermissions(NPCAvatar av, UUID callerID) 454 private bool CheckPermissions(NPCAvatar av, UUID callerID)
448 { 455 {
449 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || 456 return callerID == UUID.Zero || av.OwnerID == UUID.Zero ||
450 av.OwnerID == callerID; 457 av.OwnerID == callerID || av.AgentId == callerID;
451 } 458 }
452 } 459 }
453} \ No newline at end of file 460} \ No newline at end of file