diff options
author | Melanie Thielker | 2008-11-17 08:29:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-17 08:29:37 +0000 |
commit | 05fb40dc0b88b9a711c4993e0b546e1ab0722ae6 (patch) | |
tree | 151c76edbc90e7f213049e70f2036e3f8ba9d000 | |
parent | Correct prim counts for group land. Correct MessageTransferModule startup (diff) | |
download | opensim-SC_OLD-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.zip opensim-SC_OLD-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.tar.gz opensim-SC_OLD-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.tar.bz2 opensim-SC_OLD-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.tar.xz |
Use the message transfer module to pass items across the grid via the profile
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index f4707de..85b5d3f 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -33,6 +33,7 @@ using OpenMetaverse; | |||
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Interfaces; | ||
36 | using OpenSim.Region.Environment.Interfaces; | 37 | using OpenSim.Region.Environment.Interfaces; |
37 | using OpenSim.Region.Environment.Scenes; | 38 | using OpenSim.Region.Environment.Scenes; |
38 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
@@ -49,6 +50,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
49 | private Dictionary<UUID, Scene> m_AgentRegions = | 50 | private Dictionary<UUID, Scene> m_AgentRegions = |
50 | new Dictionary<UUID, Scene>(); | 51 | new Dictionary<UUID, Scene>(); |
51 | 52 | ||
53 | private IMessageTransferModule m_TransferModule = null; | ||
54 | |||
52 | #region IRegionModule Members | 55 | #region IRegionModule Members |
53 | 56 | ||
54 | public void Initialise(Scene scene, IConfigSource config) | 57 | public void Initialise(Scene scene, IConfigSource config) |
@@ -65,6 +68,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
65 | 68 | ||
66 | if (!m_Scenelist.Contains(scene)) | 69 | if (!m_Scenelist.Contains(scene)) |
67 | { | 70 | { |
71 | if (m_Scenelist.Count == 0) | ||
72 | { | ||
73 | m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>(); | ||
74 | if (m_TransferModule == null) | ||
75 | m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); | ||
76 | } | ||
77 | |||
68 | m_Scenelist.Add(scene); | 78 | m_Scenelist.Add(scene); |
69 | 79 | ||
70 | scene.RegisterModuleInterface<IInventoryTransferModule>(this); | 80 | scene.RegisterModuleInterface<IInventoryTransferModule>(this); |
@@ -169,9 +179,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
169 | } | 179 | } |
170 | else | 180 | else |
171 | { | 181 | { |
172 | // Send via grid services | 182 | if (m_TransferModule != null) |
173 | // | 183 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {} ); |
174 | // TODO: Implement grid sending | ||
175 | } | 184 | } |
176 | } | 185 | } |
177 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted) | 186 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted) |
@@ -188,9 +197,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
188 | } | 197 | } |
189 | else | 198 | else |
190 | { | 199 | { |
191 | // Send via grid | 200 | if (m_TransferModule != null) |
192 | // | 201 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {} ); |
193 | // TODO: Implement sending via grid | ||
194 | } | 202 | } |
195 | } | 203 | } |
196 | else if (im.dialog == (byte) InstantMessageDialog.InventoryDeclined) | 204 | else if (im.dialog == (byte) InstantMessageDialog.InventoryDeclined) |
@@ -246,9 +254,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer | |||
246 | } | 254 | } |
247 | else | 255 | else |
248 | { | 256 | { |
249 | // Send via grid | 257 | if (m_TransferModule != null) |
250 | // | 258 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {} ); |
251 | // TODO: Implement sending via grid | ||
252 | } | 259 | } |
253 | } | 260 | } |
254 | } | 261 | } |