From 89322aaf9424ea9ef58d8a91f34f7856ce597e9b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 4 Nov 2012 15:17:47 -0800 Subject: Prevent IMs being sent to prims when avies decline inventory offers from them. --- .../Inventory/Transfer/InventoryTransferModule.cs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 8ff20dd..e200775 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -434,16 +434,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer scene.SendInventoryUpdate(client, trashFolder, true, true); } - ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); - - if (user != null) // Local - { - user.ControllingClient.SendInstantMessage(im); - } - else + if (im.dialog == (byte)InstantMessageDialog.InventoryDeclined) { - if (m_TransferModule != null) - m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); + 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) { }); + } } } } -- cgit v1.1