From c49e1b8fb67edb686038e6d200914ed3358bf649 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 25 Oct 2008 13:53:17 +0000 Subject: A few more bots to yesterday's plumbing: change instant message method signature --- OpenSim/Framework/IClientAPI.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 ++++--- .../Modules/Avatar/InstantMessage/InstantMessageModule.cs | 3 ++- .../Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 6 +++--- OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 2 +- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index f38b57f..471def5 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -656,7 +656,7 @@ namespace OpenSim.Framework void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, UUID imSessionID, string fromName, byte dialog, uint timeStamp, - byte[] binaryBucket); + bool fromGroup, byte[] binaryBucket); void SendGenericMessage(string method, List message); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 340472c..d24b54d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1106,7 +1106,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { SendInstantMessage( fromAgent, fromAgentSession, message, toAgent, - imSessionID, fromName, dialog, timeStamp, new byte[0]); + imSessionID, fromName, dialog, timeStamp, false, new byte[0]); } /// @@ -1116,7 +1116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, UUID imSessionID, string fromName, byte dialog, uint timeStamp, - byte[] binaryBucket) + bool fromGroup, byte[] binaryBucket) { if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) { @@ -1127,7 +1127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP msg.AgentData.SessionID = fromAgentSession; msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName); msg.MessageBlock.Dialog = dialog; - msg.MessageBlock.FromGroup = false; + msg.MessageBlock.FromGroup = fromGroup; msg.MessageBlock.ID = imSessionID; msg.MessageBlock.Offline = 0; msg.MessageBlock.ParentEstateID = 0; @@ -4089,6 +4089,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP break; case PacketType.ImprovedInstantMessage: ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; +Console.WriteLine(msgpack.ToString()); string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message); handlerInstantMessage = OnInstantMessage; diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index 9312fd8..3e45f7f 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs @@ -117,7 +117,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage = ((dialog == 38) || (dialog == 39) || (dialog == 40) || dialog == (byte) InstantMessageDialog.InventoryOffered || dialog == (byte) InstantMessageDialog.InventoryAccepted - || dialog == (byte) InstantMessageDialog.InventoryDeclined); + || dialog == (byte) InstantMessageDialog.InventoryDeclined + || dialog == (byte) InstantMessageDialog.GroupNotice); // IM dialogs need to be pre-processed and have their sessionID filled by the server // so the sim can match the transaction on the return packet. diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index ed58338..b18fb5d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer user.ControllingClient.SendInstantMessage( fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, - dialog, timestamp, binaryBucket); + dialog, timestamp, false, binaryBucket); return; } @@ -159,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer { user.ControllingClient.SendInstantMessage( fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, - dialog, timestamp, binaryBucket); + dialog, timestamp, false, binaryBucket); if (m_pendingOffers.ContainsKey(imSessionID)) { @@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer { user.ControllingClient.SendInstantMessage( fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromAgentName, - dialog, timestamp, binaryBucket); + dialog, timestamp, false, binaryBucket); if (m_pendingOffers.ContainsKey(imSessionID)) { diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index e2b035a..5c22bb1 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -478,7 +478,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, UUID imSessionID, string fromName, byte dialog, uint timeStamp, - byte[] binaryBucket) + bool fromGroup, byte[] binaryBucket) { } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index d61d649..ad2fcdf 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -390,7 +390,7 @@ namespace OpenSim.Region.Examples.SimpleModule public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, UUID imSessionID, string fromName, byte dialog, uint timeStamp, - byte[] binaryBucket) + bool fromGroup, byte[] binaryBucket) { } -- cgit v1.1