From 993b965f0af440aaa8395acf1b2b312e1b95166e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 9 Jan 2009 15:15:41 +0000 Subject: [PATCH] Prevent error message from scripted IM Fixes Mantis #2970 --- .../Modules/World/Permissions/PermissionsModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 96e7919f3a..f765cfe725 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -845,6 +845,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; + // If the sender is an object, check owner instead + // + SceneObjectPart part = startScene.GetSceneObjectPart(user); + if (part != null) + user = part.OwnerID; + return GenericCommunicationPermission(user, target); }