From 08b37efc327c8d05394007a7dcb2eb813422fb92 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 4 Nov 2012 15:17:47 -0800 Subject: [PATCH] Prevent IMs being sent to prims when avies decline inventory offers from them. --- .../Transfer/InventoryTransferModule.cs | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index c14cb1791b..8176989e0b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -409,16 +409,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer "received inventory" + reason, false); } - ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); + if (im.dialog == (byte)InstantMessageDialog.InventoryDeclined) + { + ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); - if (user != null) // Local - { - user.ControllingClient.SendInstantMessage(im); - } - else - { - if (m_TransferModule != null) - m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); + if (user != null) // Local + { + user.ControllingClient.SendInstantMessage(im); + } + else + { + if (m_TransferModule != null) + m_TransferModule.SendInstantMessage(im, delegate(bool success) { }); + } } } }