aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-12-04 22:52:46 +0000
committerJustin Clark-Casey (justincc)2014-12-04 22:52:46 +0000
commitbee3f203cd93ed3816ff9d24ea04d4aa898cf779 (patch)
treedb5ff0c4579db75df99f4f68d0565559dd10596d /OpenSim/Region/OptionalModules/World
parentminor: Add doc about [InventoryService] AllowDelete setting to robust ini exa... (diff)
downloadopensim-SC-bee3f203cd93ed3816ff9d24ea04d4aa898cf779.zip
opensim-SC-bee3f203cd93ed3816ff9d24ea04d4aa898cf779.tar.gz
opensim-SC-bee3f203cd93ed3816ff9d24ea04d4aa898cf779.tar.bz2
opensim-SC-bee3f203cd93ed3816ff9d24ea04d4aa898cf779.tar.xz
Allow scripts in attachments on an owned NPC to call NPC functions on that NPC
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-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