From 8383bde76880fc94a6644422d45baa28252b0231 Mon Sep 17 00:00:00 2001
From: CasperW
Date: Tue, 24 Nov 2009 18:18:19 +0100
Subject: Removed some extra debug chatter
---
.../CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index d9a021f..b60b32b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -389,7 +389,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
{
// Check if this is ours to handle
//
- m_log.Info("OnFridInstantMessage");
+ //m_log.Info("OnFridInstantMessage");
if (msg.dialog != (byte) InstantMessageDialog.InventoryOffered)
return;
--
cgit v1.1
From cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 29 Jan 2010 07:20:13 +0000
Subject: Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
---
.../Inventory/Archiver/InventoryArchiverModule.cs | 35 +++---------
.../Inventory/Transfer/InventoryTransferModule.cs | 63 ++++++----------------
2 files changed, 21 insertions(+), 77 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index a04ab22..ecd60bd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using log4net;
-using Mono.Addins;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
@@ -42,11 +41,10 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
- [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
///
/// This module loads and saves OpenSimulator inventory archives
///
- public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule
+ public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -84,28 +82,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
DisablePresenceChecks = disablePresenceChecks;
}
- public void Initialise(IConfigSource source)
- {
-
- }
-
- public Type ReplaceableInterface
- {
- get { return null; }
- }
-
- public void AddRegion(Scene scene)
+ public void Initialise(Scene scene, IConfigSource source)
{
if (m_scenes.Count == 0)
{
scene.RegisterModuleInterface(this);
OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted;
-
+
scene.AddCommand(
this, "load iar",
"load iar []",
- "Load user inventory archive.", HandleLoadInvConsoleCommand);
-
+ "Load user inventory archive.", HandleLoadInvConsoleCommand);
+
scene.AddCommand(
this, "save iar",
"save iar []",
@@ -113,21 +101,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_aScene = scene;
}
-
+
m_scenes[scene.RegionInfo.RegionID] = scene;
}
- public void RegionLoaded(Scene scene)
- {
- }
-
- public void RemoveRegion(Scene scene)
- {
- scene.UnregisterModuleInterface(this);
- if(m_scenes.ContainsKey(scene.RegionInfo.RegionID))
- m_scenes.Remove(scene.RegionInfo.RegionID);
- }
-
public void PostInitialise() {}
public void Close() {}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index abf440e..b60b32b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -29,7 +29,6 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
-using Mono.Addins;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
@@ -40,8 +39,7 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
{
- [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
- public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule
+ public class InventoryTransferModule : IInventoryTransferModule, IRegionModule
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -52,11 +50,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
new Dictionary();
private IMessageTransferModule m_TransferModule = null;
- private bool m_enabled = true;
- #region ISharedRegionModule Members
+ #region IRegionModule Members
- public void Initialise(IConfigSource config)
+ public void Initialise(Scene scene, IConfigSource config)
{
if (config.Configs["Messaging"] != null)
{
@@ -65,61 +62,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
if (config.Configs["Messaging"].GetString(
"InventoryTransferModule", "InventoryTransferModule") !=
"InventoryTransferModule")
- m_enabled = false;
+ return;
}
- }
-
- public Type ReplaceableInterface
- {
- get { return null; }
- }
- public void AddRegion(Scene scene)
- {
- if (m_enabled)
+ if (!m_Scenelist.Contains(scene))
{
- if (!m_Scenelist.Contains(scene))
- {
- m_Scenelist.Add(scene);
+ m_Scenelist.Add(scene);
- scene.RegisterModuleInterface(this);
+ scene.RegisterModuleInterface(this);
- scene.EventManager.OnNewClient += OnNewClient;
- scene.EventManager.OnClientClosed += ClientLoggedOut;
- scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
- }
+ scene.EventManager.OnNewClient += OnNewClient;
+ scene.EventManager.OnClientClosed += ClientLoggedOut;
+ scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
}
}
- public void RegionLoaded(Scene scene)
+ public void PostInitialise()
{
- if (m_enabled)
+ if (m_Scenelist.Count > 0)
{
- if (m_Scenelist.Count > 0)
- {
- m_TransferModule = m_Scenelist[0].RequestModuleInterface();
- if (m_TransferModule == null)
- m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
- }
+ m_TransferModule = m_Scenelist[0].RequestModuleInterface();
+ if (m_TransferModule == null)
+ m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
}
}
- public void RemoveRegion(Scene scene)
- {
- if (m_Scenelist.Contains(scene))
- m_Scenelist.Remove(scene);
-
- scene.UnregisterModuleInterface(this);
-
- scene.EventManager.OnNewClient -= OnNewClient;
- scene.EventManager.OnClientClosed -= ClientLoggedOut;
- scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
- }
-
- public void PostInitialise()
- {
- }
-
public void Close()
{
}
--
cgit v1.1
From 95c763201f6f777557bc1c88e4bcbfbfd0aeebda Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 20 Jun 2010 06:36:46 +0200
Subject: Set the offline flag in inventory offers
---
.../CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 2f1e9dd..0d04491 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -241,6 +241,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
im.imSessionID = itemID.Guid;
}
+ im.offline = 1; // Remember these
+
// Send the IM to the recipient. The item is already
// in their inventory, so it will not be lost if
// they are offline.
--
cgit v1.1
From a48c4932108c68156ee62e9e39da618e55d85902 Mon Sep 17 00:00:00 2001
From: sacha
Date: Wed, 4 Aug 2010 08:16:55 +0000
Subject: Cost Reduction : Removing verbose message....
---
.../CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 0d04491..98545f9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -153,7 +153,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
{
- m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog);
+ //m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog);
Scene scene = FindClientScene(client.AgentId);
--
cgit v1.1
From 82e534a0291c2a2c54ad95991d7b8ed6b6524839 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 4 Nov 2010 19:07:43 +0100
Subject: Fix avatar to avatar inventory gives across servers
---
.../Inventory/Transfer/InventoryTransferModule.cs | 58 +++++++++++++++++++---
1 file changed, 50 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 6badc74..e9e7c25 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -175,8 +175,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
if (im.binaryBucket.Length < 17) // Invalid
return;
- UUID receipientID = new UUID(im.toAgentID);
- ScenePresence user = scene.GetScenePresence(receipientID);
+ UUID recipientID = new UUID(im.toAgentID);
+ ScenePresence user = scene.GetScenePresence(recipientID);
UUID copyID;
// First byte is the asset type
@@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
folderID, new UUID(im.toAgentID));
InventoryFolderBase folderCopy
- = scene.GiveInventoryFolder(receipientID, client.AgentId, folderID, UUID.Zero);
+ = scene.GiveInventoryFolder(recipientID, client.AgentId, folderID, UUID.Zero);
if (folderCopy == null)
{
@@ -419,22 +419,64 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
///
///
///
- private void OnGridInstantMessage(GridInstantMessage msg)
+ private void OnGridInstantMessage(GridInstantMessage im)
{
// Check if this is ours to handle
//
- Scene scene = FindClientScene(new UUID(msg.toAgentID));
+ Scene scene = FindClientScene(new UUID(im.toAgentID));
if (scene == null)
return;
// Find agent to deliver to
//
- ScenePresence user = scene.GetScenePresence(new UUID(msg.toAgentID));
+ ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
+ if (user == null)
+ return;
+
+ // This requires a little bit of processing because we have to make the
+ // new item visible in the recipient's inventory here
+ //
+ if (im.dialog == (byte) InstantMessageDialog.InventoryOffered)
+ {
+ if (im.binaryBucket.Length < 17) // Invalid
+ return;
+
+ UUID recipientID = new UUID(im.toAgentID);
+
+ // First byte is the asset type
+ AssetType assetType = (AssetType)im.binaryBucket[0];
+
+ if (AssetType.Folder == assetType)
+ {
+ UUID folderID = new UUID(im.binaryBucket, 1);
- // Just forward to local handling
- OnInstantMessage(user.ControllingClient, msg);
+ InventoryFolderBase given =
+ new InventoryFolderBase(folderID, recipientID);
+ InventoryFolderBase folder =
+ scene.InventoryService.GetFolder(given);
+
+ if (folder != null)
+ user.ControllingClient.SendBulkUpdateInventory(folder);
+ }
+ else
+ {
+ UUID itemID = new UUID(im.binaryBucket, 1);
+
+ InventoryItemBase given =
+ new InventoryItemBase(itemID, recipientID);
+ InventoryItemBase item =
+ scene.InventoryService.GetItem(given);
+
+ if (item != null)
+ {
+ user.ControllingClient.SendBulkUpdateInventory(item);
+ }
+ }
+ }
+ // Just forward to the client
+ user.ControllingClient.SendInstantMessage(im);
}
}
}
--
cgit v1.1
From 4db60a5a40580bf5aa56d80c319534e2e312a306 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 5 Nov 2010 15:24:08 +0100
Subject: Fix the inventory transfer module to not cause duplicated text IMs
---
.../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index e9e7c25..528bc8d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -473,10 +473,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
user.ControllingClient.SendBulkUpdateInventory(item);
}
}
+ user.ControllingClient.SendInstantMessage(im);
+ }
+ else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
+ im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
+ {
+ user.ControllingClient.SendInstantMessage(im);
}
-
- // Just forward to the client
- user.ControllingClient.SendInstantMessage(im);
}
}
}
--
cgit v1.1
From 6becaf65e15e3fde2d910925b4f7ff09971121f3 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Mon, 7 Feb 2011 22:28:59 +0000
Subject: Fix merge issues
---
.../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 6 ------
1 file changed, 6 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 68538c9..a71def7 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -128,11 +128,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ " is the user's last name." + Environment.NewLine
+ " is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
+ "-p|--profile= adds the url of the profile service to the saved user information." + Environment.NewLine
-<<<<<<< HEAD:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
-=======
+ "-c|--creators preserves information about foreign creators." + Environment.NewLine
+ "-v|--verbose extra debug messages." + Environment.NewLine
->>>>>>> master:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+ " is the filesystem path at which to save the IAR."
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
HandleSaveInvConsoleCommand);
@@ -399,11 +396,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OptionSet ops = new OptionSet();
//ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
-<<<<<<< HEAD:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
-=======
ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
ops.Add("c|creators", delegate(string v) { options["creators"] = v; });
->>>>>>> master:OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
List mainParams = ops.Parse(cmdparams);
--
cgit v1.1
From 62d0a0cdbf076b0d763afe5bf7c6f8ae780f5efb Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 6 Dec 2011 22:58:00 +0100
Subject: Remove harmless merge artefact
---
.../CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index b33342f..aa211ba 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -244,7 +244,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
im.imSessionID = itemID.Guid;
}
- im.offline = 1; // Remember these
+ im.offline = 0;
// Send the IM to the recipient. The item is already
// in their inventory, so it will not be lost if
--
cgit v1.1
From d6486fe14a77b74235eaa9e1feab36f923dc6ee9 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 7 Dec 2011 00:43:59 +0100
Subject: Fix task inventory giving
---
.../Inventory/Transfer/InventoryTransferModule.cs | 29 +++++-----------------
1 file changed, 6 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index aa211ba..677fab9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -265,7 +265,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
});
}
}
- else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted)
+ else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
+ im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
{
ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
@@ -276,30 +277,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
else
{
if (m_TransferModule != null)
- m_TransferModule.SendInstantMessage(im, delegate(bool success) {
-
- // justincc - FIXME: Comment out for now. This code was added in commit db91044 Mon Aug 22 2011
- // and is apparently supposed to fix bulk inventory updates after accepting items. But
- // instead it appears to cause two copies of an accepted folder for the receiving user in
- // at least some cases. Folder/item update is already done when the offer is made (see code above)
-
-// // Send BulkUpdateInventory
-// IInventoryService invService = scene.InventoryService;
-// UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item /folder, back from it's trip
-//
-// InventoryFolderBase folder = new InventoryFolderBase(inventoryEntityID, client.AgentId);
-// folder = invService.GetFolder(folder);
-//
-// ScenePresence fromUser = scene.GetScenePresence(new UUID(im.fromAgentID));
-//
-// // If the user has left the scene by the time the message comes back then we can't send
-// // them the update.
-// if (fromUser != null)
-// fromUser.ControllingClient.SendBulkUpdateInventory(folder);
- });
+ m_TransferModule.SendInstantMessage(im, delegate(bool success) {});
}
}
- else if (im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
+ else if (im.dialog == (byte) InstantMessageDialog.InventoryDeclined ||
+ im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined)
{
// Here, the recipient is local and we can assume that the
// inventory is loaded. Courtesy of the above bulk update,
@@ -335,6 +317,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
{
folder.ParentID = trashFolder.ID;
invService.MoveFolder(folder);
+ client.SendBulkUpdateInventory(folder);
}
}
--
cgit v1.1
From f317953290f7240768bf52238541663134ac76ea Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 7 Dec 2011 01:02:46 +0100
Subject: Fix up intersim give messaging
---
.../Inventory/Transfer/InventoryTransferModule.cs | 42 +++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 677fab9..8824cab 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -474,8 +474,48 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
}
user.ControllingClient.SendInstantMessage(im);
}
+ if (im.dialog == (byte) InstantMessageDialog.TaskInventoryOffered)
+ {
+ if (im.binaryBucket.Length < 1) // Invalid
+ return;
+
+ UUID recipientID = new UUID(im.toAgentID);
+
+ // Bucket is the asset type
+ AssetType assetType = (AssetType)im.binaryBucket[0];
+
+ if (AssetType.Folder == assetType)
+ {
+ UUID folderID = new UUID(im.imSessionID);
+
+ InventoryFolderBase given =
+ new InventoryFolderBase(folderID, recipientID);
+ InventoryFolderBase folder =
+ scene.InventoryService.GetFolder(given);
+
+ if (folder != null)
+ user.ControllingClient.SendBulkUpdateInventory(folder);
+ }
+ else
+ {
+ UUID itemID = new UUID(im.imSessionID);
+
+ InventoryItemBase given =
+ new InventoryItemBase(itemID, recipientID);
+ InventoryItemBase item =
+ scene.InventoryService.GetItem(given);
+
+ if (item != null)
+ {
+ user.ControllingClient.SendBulkUpdateInventory(item);
+ }
+ }
+ user.ControllingClient.SendInstantMessage(im);
+ }
else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
- im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
+ im.dialog == (byte) InstantMessageDialog.InventoryDeclined ||
+ im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined ||
+ im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
{
user.ControllingClient.SendInstantMessage(im);
}
--
cgit v1.1
From ccba04f3451c5034669bbd999cd9ab2a3e8bd5a0 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 7 Dec 2011 01:27:52 +0100
Subject: Fix intersim object give messages
---
.../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 8824cab..da708d2 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -510,6 +510,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
user.ControllingClient.SendBulkUpdateInventory(item);
}
}
+
+ // Fix up binary bucket since this may be 17 chars long here
+ Byte[] bucket = new Byte[1];
+ bucket[0] = im.binaryBucket[0];
+ im.binaryBucket = bucket;
+
user.ControllingClient.SendInstantMessage(im);
}
else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
--
cgit v1.1
From 44ce068d6cd8afe3780b26f77d2a1b39ac81ef44 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sun, 11 Mar 2012 18:21:47 +0100
Subject: Allow RLV to redirect received folders to #RLV folder
---
.../Inventory/Transfer/InventoryTransferModule.cs | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
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
else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
{
+ UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
+ IInventoryService invService = scene.InventoryService;
+
+ // Special case: folder redirect.
+ // RLV uses this
+ if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
+ {
+ InventoryFolderBase folder = new InventoryFolderBase(inventoryID, client.AgentId);
+ folder = invService.GetFolder(folder);
+
+ if (folder != null)
+ {
+ if (im.binaryBucket.Length >= 16)
+ {
+ UUID destFolderID = new UUID(im.binaryBucket, 0);
+ if (destFolderID != UUID.Zero)
+ {
+ InventoryFolderBase destFolder = new InventoryFolderBase(destFolderID, client.AgentId);
+ destFolder = invService.GetFolder(destFolder);
+ if (destFolder != null)
+ {
+ if (folder.ParentID != destFolder.ID)
+ {
+ folder.ParentID = destFolder.ID;
+ invService.MoveFolder(folder);
+ client.SendBulkUpdateInventory(folder);
+ }
+ }
+ }
+ }
+ }
+ }
+
ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
if (user != null) // Local
--
cgit v1.1
From 0993af08718eaf6956facd3f2ee77cef602de259 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 24 Jul 2012 11:38:30 +0200
Subject: Allow load and save of IAR without a password. The password must
still be present on the command line for compatibility, but is ignored.
Avination's IAR operations are administratively done and the staff doesn't
have the passwords of the users.
---
.../CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index cf87010..7d1fe68 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -492,6 +492,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
return null;
}
+ return account;
+ /*
try
{
string encpass = Util.Md5Hash(pass);
@@ -512,6 +514,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_log.ErrorFormat("[INVENTORY ARCHIVER]: Could not authenticate password, {0}", e.Message);
return null;
}
+ */
}
///
--
cgit v1.1
From 80118ac0575ad6816f65ed7436ec4e0b384f231d Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 21 Nov 2014 04:00:52 +0100
Subject: Remove braindead "fix" that messed up intersim scripted giving.
---
.../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 11 -----------
1 file changed, 11 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 03aaaac..3815c71 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -471,17 +471,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
///
private void OnGridInstantMessage(GridInstantMessage im)
{
- // Check if it's a type of message that we should handle
- if (!((im.dialog == (byte) InstantMessageDialog.InventoryOffered)
- || (im.dialog == (byte) InstantMessageDialog.InventoryAccepted)
- || (im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
- || (im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined)))
- return;
-
- m_log.DebugFormat(
- "[INVENTORY TRANSFER]: {0} IM type received from grid. From={1} ({2}), To={3}",
- (InstantMessageDialog)im.dialog, im.fromAgentID, im.fromAgentName, im.toAgentID);
-
// Check if this is ours to handle
//
Scene scene = FindClientScene(new UUID(im.toAgentID));
--
cgit v1.1