aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 81de29c..c14cb17 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -313,6 +313,45 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
313 m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); 313 m_TransferModule.SendInstantMessage(im, delegate(bool success) {});
314 } 314 }
315 } 315 }
316 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
317 {
318 UUID destinationFolderID = UUID.Zero;
319
320 if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
321 {
322 destinationFolderID = new UUID(im.binaryBucket, 0);
323 }
324
325 if (destinationFolderID != UUID.Zero)
326 {
327 IInventoryService invService = scene.InventoryService;
328
329 UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
330
331 InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
332 item = invService.GetItem(item);
333 InventoryFolderBase folder = null;
334
335 if (item != null) // It's an item
336 {
337 item.Folder = destinationFolderID;
338
339 invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
340 scene.AddInventoryItem(client, item);
341 }
342 else
343 {
344 folder = new InventoryFolderBase(inventoryID, client.AgentId);
345 folder = invService.GetFolder(folder);
346
347 if (folder != null) // It's a folder
348 {
349 folder.ParentID = destinationFolderID;
350 invService.MoveFolder(folder);
351 }
352 }
353 }
354 }
316 else if ( 355 else if (
317 im.dialog == (byte)InstantMessageDialog.InventoryDeclined 356 im.dialog == (byte)InstantMessageDialog.InventoryDeclined
318 || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) 357 || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)