From 14368d9a732d4e8f6508aec07a3c3c51e3e9f33e Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 30 Dec 2007 04:12:08 +0000 Subject: * Applied Melanie's same instance IM fix. This will make IMs work within the same OpenSim Instance. --- OpenSim/Framework/IClientAPI.cs | 18 ++++-------------- OpenSim/Region/ClientStack/ClientView.cs | 13 ++++++++++++- .../Region/Environment/Modules/InstantMessageModule.cs | 10 ++++++---- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 1154fba..61a713a 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -225,20 +225,10 @@ namespace OpenSim.Framework public delegate void ImprovedInstantMessage( LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, - string fromAgentName, string message, byte dialog); // Cut down from full list - - //rezPacket.RezData.BypassRaycast; - //rezPacket.RezData.RayEnd; - //rezPacket.RezData.RayEndIsIntersection; - //rezPacket.RezData.RayStart; - //rezPacket.RezData.RayTargetID; - //rezPacket.RezData.RemoveItem; - //rezPacket.RezData.RezSelected; - //rezPacket.RezData.FromTaskID; - //rezPacket.RezData.FromTaskID; - //rezPacket.RezData.EveryoneMask; - //rezPacket.RezData.GroupMask; - //rezPacket.RezData.NextOwnerMask; + string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, + LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... + // especially if we're ever going to implement groups, presence, estate message dialogs... + public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 0d3c07e..932414d 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -2540,12 +2540,23 @@ namespace OpenSim.Region.ClientStack ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket) Pack; string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); + //byte[] msgpack.MessageBlock.BinaryBucket; + //bool msgpack.MessageBlock.FromGroup; + + //byte msgpack.MessageBlock.Offline; + //uint msgpack.MessageBlock.ParentEstateID; + //LLVector3 msgpack.MessageBlock.Position; + //LLUUID msgpack.MessageBlock.RegionID; + if (OnInstantMessage != null) { OnInstantMessage(msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID, msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, - msgpack.MessageBlock.Dialog); + msgpack.MessageBlock.Dialog, msgpack.MessageBlock.FromGroup, + msgpack.MessageBlock.Offline, msgpack.MessageBlock.ParentEstateID, + msgpack.MessageBlock.Position, msgpack.MessageBlock.RegionID, + msgpack.MessageBlock.BinaryBucket); } break; case PacketType.RezObject: diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index cf6a94d..1e1d236 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs @@ -63,7 +63,9 @@ namespace OpenSim.Region.Environment.Modules private void OnInstantMessage(LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, string fromAgentName, - string message, byte dialog) + string message, byte dialog, bool fromGroup, byte offline, + uint ParentEstateID, LLVector3 Position, LLUUID RegionID, + byte[] binaryBucket) { foreach (Scene scene in m_scenes) { @@ -76,9 +78,9 @@ namespace OpenSim.Region.Environment.Modules user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, dialog, timestamp); + // Message sent + return; } - // Message sent - return; } } @@ -104,4 +106,4 @@ namespace OpenSim.Region.Environment.Modules get { return true; } } } -} \ No newline at end of file +} -- cgit v1.1