From 3de41ea3777487ee4cc25a4185de1bc63950ba6a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 16 Nov 2008 04:31:52 +0000 Subject: Reinstate the IM sending from scripts and from autoreturn --- OpenSim/Region/Environment/Scenes/Scene.cs | 6 ++++-- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7485134..e19857c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -41,6 +41,7 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Interfaces; using OpenSim.Region.Environment.Modules.World.Archiver; using OpenSim.Region.Environment.Modules.World.Serialiser; using OpenSim.Region.Environment.Modules.World.Terrain; @@ -993,8 +994,9 @@ namespace OpenSim.Region.Environment.Scenes else msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to parcel auto return", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName); -// TODO: Send IM -// TriggerGridInstantMessage(msg); + IMessageTransferModule tr = RequestModuleInterface(); + if (tr != null) + tr.SendInstantMessage(msg, delegate(bool success) {} ); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 37ad554..8eff58e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2645,9 +2645,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; msg.binaryBucket = new byte[0];// binaryBucket; -// TODO: Send IM -// World.TriggerGridInstantMessage(msg); - // ScriptSleep(2000); + + IMessageTransferModule tr = World.RequestModuleInterface(); + + if (tr != null) + { + tr.SendInstantMessage(msg, delegate(bool success) {} ); + } + ScriptSleep(2000); } public void llEmail(string address, string subject, string message) -- cgit v1.1