aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2012-03-11 18:21:47 +0100
committerMelanie2012-03-11 18:21:47 +0100
commit44ce068d6cd8afe3780b26f77d2a1b39ac81ef44 (patch)
treec7cf4aea7452010d411b4bc1b1c02f037b84116b /OpenSim/Region/CoreModules
parentMerge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff)
downloadopensim-SC_OLD-44ce068d6cd8afe3780b26f77d2a1b39ac81ef44.zip
opensim-SC_OLD-44ce068d6cd8afe3780b26f77d2a1b39ac81ef44.tar.gz
opensim-SC_OLD-44ce068d6cd8afe3780b26f77d2a1b39ac81ef44.tar.bz2
opensim-SC_OLD-44ce068d6cd8afe3780b26f77d2a1b39ac81ef44.tar.xz
Allow RLV to redirect received folders to #RLV folder
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index da708d2..80554fb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -268,6 +268,39 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
268 else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || 268 else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
269 im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) 269 im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
270 { 270 {
271 UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
272 IInventoryService invService = scene.InventoryService;
273
274 // Special case: folder redirect.
275 // RLV uses this
276 if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
277 {
278 InventoryFolderBase folder = new InventoryFolderBase(inventoryID, client.AgentId);
279 folder = invService.GetFolder(folder);
280
281 if (folder != null)
282 {
283 if (im.binaryBucket.Length >= 16)
284 {
285 UUID destFolderID = new UUID(im.binaryBucket, 0);
286 if (destFolderID != UUID.Zero)
287 {
288 InventoryFolderBase destFolder = new InventoryFolderBase(destFolderID, client.AgentId);
289 destFolder = invService.GetFolder(destFolder);
290 if (destFolder != null)
291 {
292 if (folder.ParentID != destFolder.ID)
293 {
294 folder.ParentID = destFolder.ID;
295 invService.MoveFolder(folder);
296 client.SendBulkUpdateInventory(folder);
297 }
298 }
299 }
300 }
301 }
302 }
303
271 ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); 304 ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
272 305
273 if (user != null) // Local 306 if (user != null) // Local