aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-17 08:29:37 +0000
committerMelanie Thielker2008-11-17 08:29:37 +0000
commit05fb40dc0b88b9a711c4993e0b546e1ab0722ae6 (patch)
tree151c76edbc90e7f213049e70f2036e3f8ba9d000 /OpenSim
parentCorrect prim counts for group land. Correct MessageTransferModule startup (diff)
downloadopensim-SC-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.zip
opensim-SC-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.tar.gz
opensim-SC-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.tar.bz2
opensim-SC-05fb40dc0b88b9a711c4993e0b546e1ab0722ae6.tar.xz
Use the message transfer module to pass items across the grid via the profile
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/Transfer/InventoryTransferModule.cs25
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;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Interfaces;
36using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
38using OpenSim.Framework.Communications.Cache; 39using 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 }