Prevent error message from scripted IM

Fixes Mantis #2970
This commit is contained in:
Melanie Thielker
2009-01-09 15:15:41 +00:00
parent 7c7ea57c5c
commit 993b965f0a

View File

@@ -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);
}