aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs39
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs41
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs29
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs144
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs1
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs33
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs68
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs50
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs5
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs15
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs43
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs30
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs310
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs2
27 files changed, 555 insertions, 289 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 2a513e9..24170fc 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -571,9 +571,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
571 571
572 if (grp.HasGroupChanged) 572 if (grp.HasGroupChanged)
573 { 573 {
574// m_log.DebugFormat( 574 m_log.DebugFormat(
575// "[ATTACHMENTS MODULE]: Updating asset for attachment {0}, attachpoint {1}", 575 "[ATTACHMENTS MODULE]: Updating asset for attachment {0}, attachpoint {1}",
576// grp.UUID, grp.AttachmentPoint); 576 grp.UUID, grp.AttachmentPoint);
577 577
578 string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, scriptedState); 578 string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, scriptedState);
579 579
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index b5b0082..0a69979 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -39,9 +39,12 @@ using OpenSim.Region.Framework.Interfaces;
39using OpenSim.Region.Framework.Scenes; 39using OpenSim.Region.Framework.Scenes;
40using OpenSim.Services.Interfaces; 40using OpenSim.Services.Interfaces;
41 41
42using Mono.Addins;
43
42namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory 44namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
43{ 45{
44 public class AvatarFactoryModule : IAvatarFactoryModule, IRegionModule 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "AvatarFactoryModule")]
47 public class AvatarFactoryModule : IAvatarFactoryModule, INonSharedRegionModule
45 { 48 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 50
@@ -59,12 +62,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
59 62
60 private object m_setAppearanceLock = new object(); 63 private object m_setAppearanceLock = new object();
61 64
62 #region IRegionModule 65 #region Region Module interface
63 66
64 public void Initialise(Scene scene, IConfigSource config) 67 public void Initialise(IConfigSource config)
65 { 68 {
66 scene.RegisterModuleInterface<IAvatarFactoryModule>(this);
67 scene.EventManager.OnNewClient += SubscribeToClientEvents;
68 69
69 IConfig appearanceConfig = config.Configs["Appearance"]; 70 IConfig appearanceConfig = config.Configs["Appearance"];
70 if (appearanceConfig != null) 71 if (appearanceConfig != null)
@@ -74,11 +75,29 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
74 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); 75 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime);
75 } 76 }
76 77
78 }
79
80 public void AddRegion(Scene scene)
81 {
77 if (m_scene == null) 82 if (m_scene == null)
78 m_scene = scene; 83 m_scene = scene;
84
85 scene.RegisterModuleInterface<IAvatarFactoryModule>(this);
86 scene.EventManager.OnNewClient += SubscribeToClientEvents;
79 } 87 }
80 88
81 public void PostInitialise() 89 public void RemoveRegion(Scene scene)
90 {
91 if (scene == m_scene)
92 {
93 scene.UnregisterModuleInterface<IAvatarFactoryModule>(this);
94 scene.EventManager.OnNewClient -= SubscribeToClientEvents;
95 }
96
97 m_scene = null;
98 }
99
100 public void RegionLoaded(Scene scene)
82 { 101 {
83 m_updateTimer.Enabled = false; 102 m_updateTimer.Enabled = false;
84 m_updateTimer.AutoReset = true; 103 m_updateTimer.AutoReset = true;
@@ -100,6 +119,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
100 get { return false; } 119 get { return false; }
101 } 120 }
102 121
122 public Type ReplaceableInterface
123 {
124 get { return null; }
125 }
126
127
103 private void SubscribeToClientEvents(IClientAPI client) 128 private void SubscribeToClientEvents(IClientAPI client)
104 { 129 {
105 client.OnRequestWearables += Client_OnRequestWearables; 130 client.OnRequestWearables += Client_OnRequestWearables;
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
index 848b3bf..1830d41 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
@@ -39,7 +39,7 @@ using OpenSim.Tests.Common.Mock;
39namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory 39namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
40{ 40{
41 [TestFixture] 41 [TestFixture]
42 public class AvatarFactoryModuleTests 42 public class AvatarFactoryModuleTests : OpenSimTestCase
43 { 43 {
44 /// <summary> 44 /// <summary>
45 /// Only partial right now since we don't yet test that it's ended up in the avatar appearance service. 45 /// Only partial right now since we don't yet test that it's ended up in the avatar appearance service.
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index e4452fb..6d62ff0 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using log4net; 31using log4net;
32using Nini.Config; 32using Nini.Config;
33using Mono.Addins;
33using OpenMetaverse; 34using OpenMetaverse;
34using OpenSim.Framework; 35using OpenSim.Framework;
35using OpenSim.Region.Framework.Interfaces; 36using OpenSim.Region.Framework.Interfaces;
@@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes;
37 38
38namespace OpenSim.Region.CoreModules.Avatar.Chat 39namespace OpenSim.Region.CoreModules.Avatar.Chat
39{ 40{
41 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ChatModule")]
40 public class ChatModule : ISharedRegionModule 42 public class ChatModule : ISharedRegionModule
41 { 43 {
42 private static readonly ILog m_log = 44 private static readonly ILog m_log =
@@ -186,6 +188,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
186 { 188 {
187 string fromName = c.From; 189 string fromName = c.From;
188 UUID fromID = UUID.Zero; 190 UUID fromID = UUID.Zero;
191 UUID ownerID = UUID.Zero;
189 UUID targetID = c.TargetUUID; 192 UUID targetID = c.TargetUUID;
190 string message = c.Message; 193 string message = c.Message;
191 IScene scene = c.Scene; 194 IScene scene = c.Scene;
@@ -208,12 +211,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
208 fromPos = avatar.AbsolutePosition; 211 fromPos = avatar.AbsolutePosition;
209 fromName = avatar.Name; 212 fromName = avatar.Name;
210 fromID = c.Sender.AgentId; 213 fromID = c.Sender.AgentId;
214 ownerID = c.Sender.AgentId;
211 215
212 break; 216 break;
213 217
214 case ChatSourceType.Object: 218 case ChatSourceType.Object:
215 fromID = c.SenderUUID; 219 fromID = c.SenderUUID;
216 220
221 if (c.SenderObject != null && c.SenderObject is SceneObjectPart)
222 ownerID = ((SceneObjectPart)c.SenderObject).OwnerID;
223
217 break; 224 break;
218 } 225 }
219 226
@@ -236,7 +243,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
236 s.ForEachRootScenePresence( 243 s.ForEachRootScenePresence(
237 delegate(ScenePresence presence) 244 delegate(ScenePresence presence)
238 { 245 {
239 if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, c.Type, message, sourceType, false)) 246 if (TrySendChatMessage(
247 presence, fromPos, regionPos, fromID, ownerID, fromName, c.Type, message, sourceType, false))
240 receiverIDs.Add(presence.UUID); 248 receiverIDs.Add(presence.UUID);
241 } 249 }
242 ); 250 );
@@ -248,8 +256,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
248 ScenePresence presence = s.GetScenePresence(targetID); 256 ScenePresence presence = s.GetScenePresence(targetID);
249 if (presence != null && !presence.IsChildAgent) 257 if (presence != null && !presence.IsChildAgent)
250 { 258 {
251 if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, ChatTypeEnum.Say, message, sourceType, true)) 259 if (TrySendChatMessage(
252 receiverIDs.Add(presence.UUID); 260 presence, fromPos, regionPos, fromID, ownerID, fromName, ChatTypeEnum.Say, message, sourceType, true))
261 receiverIDs.Add(presence.UUID);
253 } 262 }
254 } 263 }
255 } 264 }
@@ -305,9 +314,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
305 (null != c.SenderObject) && 314 (null != c.SenderObject) &&
306 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) 315 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
307 return; 316 return;
308 317
309 client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, 318 client.SendChatMessage(
310 (byte)sourceType, (byte)ChatAudibleLevel.Fully); 319 c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID,
320 (byte)sourceType, (byte)ChatAudibleLevel.Fully);
321
311 receiverIDs.Add(client.AgentId); 322 receiverIDs.Add(client.AgentId);
312 }); 323 });
313 324
@@ -322,15 +333,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
322 /// <param name="fromPos"></param> 333 /// <param name="fromPos"></param>
323 /// <param name="regionPos">/param> 334 /// <param name="regionPos">/param>
324 /// <param name="fromAgentID"></param> 335 /// <param name="fromAgentID"></param>
336 /// <param name='ownerID'>
337 /// Owner of the message. For at least some messages from objects, this has to be correctly filled with the owner's UUID.
338 /// This is the case for script error messages in viewer 3 since LLViewer change EXT-7762
339 /// </param>
325 /// <param name="fromName"></param> 340 /// <param name="fromName"></param>
326 /// <param name="type"></param> 341 /// <param name="type"></param>
327 /// <param name="message"></param> 342 /// <param name="message"></param>
328 /// <param name="src"></param> 343 /// <param name="src"></param>
329 /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a 344 /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a
330 /// precondition</returns> 345 /// precondition</returns>
331 protected virtual bool TrySendChatMessage(ScenePresence presence, Vector3 fromPos, Vector3 regionPos, 346 protected virtual bool TrySendChatMessage(
332 UUID fromAgentID, string fromName, ChatTypeEnum type, 347 ScenePresence presence, Vector3 fromPos, Vector3 regionPos,
333 string message, ChatSourceType src, bool ignoreDistance) 348 UUID fromAgentID, UUID ownerID, string fromName, ChatTypeEnum type,
349 string message, ChatSourceType src, bool ignoreDistance)
334 { 350 {
335 // don't send stuff to child agents 351 // don't send stuff to child agents
336 if (presence.IsChildAgent) return false; 352 if (presence.IsChildAgent) return false;
@@ -353,10 +369,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
353 } 369 }
354 370
355 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView 371 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView
356 presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName, 372 presence.ControllingClient.SendChatMessage(
357 fromAgentID, (byte)src, (byte)ChatAudibleLevel.Fully); 373 message, (byte) type, fromPos, fromName,
374 fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully);
358 375
359 return true; 376 return true;
360 } 377 }
361 } 378 }
362} 379} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
index 3a91465..343cdb5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
@@ -33,9 +33,12 @@ using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
34using OpenMetaverse; 34using OpenMetaverse;
35 35
36using Mono.Addins;
37
36namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule 38namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
37{ 39{
38 public class CombatModule : IRegionModule 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CombatModule")]
41 public class CombatModule : ISharedRegionModule
39 { 42 {
40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 44
@@ -54,7 +57,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
54 /// </summary> 57 /// </summary>
55 /// <param name="scene"></param> 58 /// <param name="scene"></param>
56 /// <param name="config"></param> 59 /// <param name="config"></param>
57 public void Initialise(Scene scene, IConfigSource config) 60 public void Initialise(IConfigSource config)
61 {
62 }
63
64 public void AddRegion(Scene scene)
58 { 65 {
59 lock (m_scenel) 66 lock (m_scenel)
60 { 67 {
@@ -72,6 +79,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
72 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 79 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
73 } 80 }
74 81
82 public void RemoveRegion(Scene scene)
83 {
84 if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
85 m_scenel.Remove(scene.RegionInfo.RegionHandle);
86
87 scene.EventManager.OnAvatarKilled -= KillAvatar;
88 scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
89 }
90
91 public void RegionLoaded(Scene scene)
92 {
93 }
94
75 public void PostInitialise() 95 public void PostInitialise()
76 { 96 {
77 } 97 }
@@ -85,11 +105,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
85 get { return "CombatModule"; } 105 get { return "CombatModule"; }
86 } 106 }
87 107
88 public bool IsSharedModule 108 public Type ReplaceableInterface
89 { 109 {
90 get { return true; } 110 get { return null; }
91 } 111 }
92 112
113
93 private void KillAvatar(uint killerObjectLocalID, ScenePresence deadAvatar) 114 private void KillAvatar(uint killerObjectLocalID, ScenePresence deadAvatar)
94 { 115 {
95 string deadAvatarMessage; 116 string deadAvatarMessage;
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 325067c..d26907b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -32,6 +32,7 @@ using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using Mono.Addins;
35 36
36using OpenSim.Region.Framework.Interfaces; 37using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
@@ -39,16 +40,27 @@ using OpenSim.Services.Interfaces;
39 40
40namespace OpenSim.Region.CoreModules.Avatar.Dialog 41namespace OpenSim.Region.CoreModules.Avatar.Dialog
41{ 42{
42 public class DialogModule : IRegionModule, IDialogModule 43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DialogModule")]
43 { 44 public class DialogModule : IDialogModule, INonSharedRegionModule
45 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 47
46 protected Scene m_scene; 48 protected Scene m_scene;
47 49
48 public void Initialise(Scene scene, IConfigSource source) 50 public void Initialise(IConfigSource source) { }
51
52 public Type ReplaceableInterface { get { return null; } }
53
54 public void AddRegion(Scene scene)
49 { 55 {
50 m_scene = scene; 56 m_scene = scene;
51 m_scene.RegisterModuleInterface<IDialogModule>(this); 57 m_scene.RegisterModuleInterface<IDialogModule>(this);
58 }
59
60 public void RegionLoaded(Scene scene)
61 {
62 if (scene != m_scene)
63 return;
52 64
53 m_scene.AddCommand( 65 m_scene.AddCommand(
54 "Users", this, "alert", "alert <message>", 66 "Users", this, "alert", "alert <message>",
@@ -56,46 +68,59 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
56 HandleAlertConsoleCommand); 68 HandleAlertConsoleCommand);
57 69
58 m_scene.AddCommand( 70 m_scene.AddCommand(
59 "Users", this, "alert-user", "alert-user <first> <last> <message>", 71 "Users", this, "alert-user",
72 "alert-user <first> <last> <message>",
60 "Send an alert to a user", 73 "Send an alert to a user",
61 HandleAlertConsoleCommand); 74 HandleAlertConsoleCommand);
62 } 75 }
63 76
64 public void PostInitialise() {} 77 public void RemoveRegion(Scene scene)
65 public void Close() {} 78 {
79 if (scene != m_scene)
80 return;
81
82 m_scene.UnregisterModuleInterface<IDialogModule>(this);
83 }
84
85 public void Close() { }
66 public string Name { get { return "Dialog Module"; } } 86 public string Name { get { return "Dialog Module"; } }
67 public bool IsSharedModule { get { return false; } } 87
68
69 public void SendAlertToUser(IClientAPI client, string message) 88 public void SendAlertToUser(IClientAPI client, string message)
70 { 89 {
71 SendAlertToUser(client, message, false); 90 SendAlertToUser(client, message, false);
72 } 91 }
73 92
74 public void SendAlertToUser(IClientAPI client, string message, bool modal) 93 public void SendAlertToUser(IClientAPI client, string message,
94 bool modal)
75 { 95 {
76 client.SendAgentAlertMessage(message, modal); 96 client.SendAgentAlertMessage(message, modal);
77 } 97 }
78 98
79 public void SendAlertToUser(UUID agentID, string message) 99 public void SendAlertToUser(UUID agentID, string message)
80 { 100 {
81 SendAlertToUser(agentID, message, false); 101 SendAlertToUser(agentID, message, false);
82 } 102 }
83 103
84 public void SendAlertToUser(UUID agentID, string message, bool modal) 104 public void SendAlertToUser(UUID agentID, string message, bool modal)
85 { 105 {
86 ScenePresence sp = m_scene.GetScenePresence(agentID); 106 ScenePresence sp = m_scene.GetScenePresence(agentID);
87 107
88 if (sp != null) 108 if (sp != null)
89 sp.ControllingClient.SendAgentAlertMessage(message, modal); 109 sp.ControllingClient.SendAgentAlertMessage(message, modal);
90 } 110 }
91 111
92 public void SendAlertToUser(string firstName, string lastName, string message, bool modal) 112 public void SendAlertToUser(string firstName, string lastName,
113 string message, bool modal)
93 { 114 {
94 ScenePresence presence = m_scene.GetScenePresence(firstName, lastName); 115 ScenePresence presence = m_scene.GetScenePresence(firstName,
116 lastName);
95 if (presence != null) 117 if (presence != null)
96 presence.ControllingClient.SendAgentAlertMessage(message, modal); 118 {
119 presence.ControllingClient.SendAgentAlertMessage(message,
120 modal);
121 }
97 } 122 }
98 123
99 public void SendGeneralAlert(string message) 124 public void SendGeneralAlert(string message)
100 { 125 {
101 m_scene.ForEachRootClient(delegate(IClientAPI client) 126 m_scene.ForEachRootClient(delegate(IClientAPI client)
@@ -104,11 +129,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
104 }); 129 });
105 } 130 }
106 131
107 public void SendDialogToUser( 132 public void SendDialogToUser(UUID avatarID, string objectName,
108 UUID avatarID, string objectName, UUID objectID, UUID ownerID, 133 UUID objectID, UUID ownerID, string message, UUID textureID,
109 string message, UUID textureID, int ch, string[] buttonlabels) 134 int ch, string[] buttonlabels)
110 { 135 {
111 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerID); 136 UserAccount account = m_scene.UserAccountService.GetUserAccount(
137 m_scene.RegionInfo.ScopeID, ownerID);
112 string ownerFirstName, ownerLastName; 138 string ownerFirstName, ownerLastName;
113 if (account != null) 139 if (account != null)
114 { 140 {
@@ -123,29 +149,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
123 149
124 ScenePresence sp = m_scene.GetScenePresence(avatarID); 150 ScenePresence sp = m_scene.GetScenePresence(avatarID);
125 if (sp != null) 151 if (sp != null)
126 sp.ControllingClient.SendDialog( 152 {
127 objectName, objectID, ownerID, ownerFirstName, ownerLastName, message, textureID, ch, buttonlabels); 153 sp.ControllingClient.SendDialog(objectName, objectID, ownerID,
154 ownerFirstName, ownerLastName, message, textureID, ch,
155 buttonlabels);
156 }
128 } 157 }
129 158
130 public void SendUrlToUser( 159 public void SendUrlToUser(UUID avatarID, string objectName,
131 UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) 160 UUID objectID, UUID ownerID, bool groupOwned, string message,
161 string url)
132 { 162 {
133 ScenePresence sp = m_scene.GetScenePresence(avatarID); 163 ScenePresence sp = m_scene.GetScenePresence(avatarID);
134 164
135 if (sp != null) 165 if (sp != null)
136 sp.ControllingClient.SendLoadURL(objectName, objectID, ownerID, groupOwned, message, url); 166 {
167 sp.ControllingClient.SendLoadURL(objectName, objectID,
168 ownerID, groupOwned, message, url);
169 }
137 } 170 }
138 171
139 public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid) 172 public void SendTextBoxToUser(UUID avatarid, string message,
173 int chatChannel, string name, UUID objectid, UUID ownerid)
140 { 174 {
141 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid); 175 UserAccount account = m_scene.UserAccountService.GetUserAccount(
176 m_scene.RegionInfo.ScopeID, ownerid);
142 string ownerFirstName, ownerLastName; 177 string ownerFirstName, ownerLastName;
143 UUID ownerID = UUID.Zero; 178 UUID ownerID = UUID.Zero;
144 if (account != null) 179 if (account != null)
145 { 180 {
146 ownerFirstName = account.FirstName; 181 ownerFirstName = account.FirstName;
147 ownerLastName = account.LastName; 182 ownerLastName = account.LastName;
148 ownerID = account.PrincipalID; 183 ownerID = account.PrincipalID;
149 } 184 }
150 else 185 else
151 { 186 {
@@ -154,29 +189,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
154 } 189 }
155 190
156 ScenePresence sp = m_scene.GetScenePresence(avatarid); 191 ScenePresence sp = m_scene.GetScenePresence(avatarid);
157 192
158 if (sp != null) 193 if (sp != null)
159 sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerID, ownerFirstName, ownerLastName, objectid); 194 {
195 sp.ControllingClient.SendTextBoxRequest(message, chatChannel,
196 name, ownerID, ownerFirstName, ownerLastName,
197 objectid);
198 }
160 } 199 }
161 200
162 public void SendNotificationToUsersInRegion( 201 public void SendNotificationToUsersInRegion(UUID fromAvatarID,
163 UUID fromAvatarID, string fromAvatarName, string message) 202 string fromAvatarName, string message)
164 { 203 {
165 m_scene.ForEachRootClient(delegate(IClientAPI client) 204 m_scene.ForEachRootClient(delegate(IClientAPI client)
166 { 205 {
167 client.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message); 206 client.SendBlueBoxMessage(fromAvatarID, fromAvatarName,
207 message);
168 }); 208 });
169 } 209 }
170 210
171 /// <summary> 211 /// <summary>
172 /// Handle an alert command from the console. 212 /// Handle an alert command from the console.
173 /// </summary> 213 /// </summary>
174 /// <param name="module"></param> 214 /// <param name="module"></param>
175 /// <param name="cmdparams"></param> 215 /// <param name="cmdparams"></param>
176 public void HandleAlertConsoleCommand(string module, string[] cmdparams) 216 public void HandleAlertConsoleCommand(string module,
217 string[] cmdparams)
177 { 218 {
178 if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene) 219 if (m_scene.ConsoleScene() != null &&
220 m_scene.ConsoleScene() != m_scene)
221 {
179 return; 222 return;
223 }
180 224
181 string message = string.Empty; 225 string message = string.Empty;
182 226
@@ -184,7 +228,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
184 { 228 {
185 message = CombineParams(cmdparams, 1); 229 message = CombineParams(cmdparams, 1);
186 m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}", 230 m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}",
187 m_scene.RegionInfo.RegionName, message); 231 m_scene.RegionInfo.RegionName, message);
188 SendGeneralAlert(message); 232 SendGeneralAlert(message);
189 } 233 }
190 else if (cmdparams.Length > 3) 234 else if (cmdparams.Length > 3)
@@ -192,9 +236,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
192 string firstName = cmdparams[1]; 236 string firstName = cmdparams[1];
193 string lastName = cmdparams[2]; 237 string lastName = cmdparams[2];
194 message = CombineParams(cmdparams, 3); 238 message = CombineParams(cmdparams, 3);
195 m_log.InfoFormat( 239 m_log.InfoFormat("[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
196 "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}", 240 m_scene.RegionInfo.RegionName, firstName, lastName,
197 m_scene.RegionInfo.RegionName, firstName, lastName, message); 241 message);
198 SendAlertToUser(firstName, lastName, message, false); 242 SendAlertToUser(firstName, lastName, message, false);
199 } 243 }
200 else 244 else
@@ -212,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
212 { 256 {
213 result += commandParams[i] + " "; 257 result += commandParams[i] + " ";
214 } 258 }
215 259
216 return result; 260 return result;
217 } 261 }
218 } 262 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index f1903c3..8056030 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -35,6 +35,7 @@ using log4net;
35using Nini.Config; 35using Nini.Config;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenMetaverse; 37using OpenMetaverse;
38using Mono.Addins;
38using OpenSim.Framework; 39using OpenSim.Framework;
39using OpenSim.Framework.Servers.HttpServer; 40using OpenSim.Framework.Servers.HttpServer;
40using OpenSim.Framework.Communications; 41using OpenSim.Framework.Communications;
@@ -50,6 +51,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
50 51
51namespace OpenSim.Region.CoreModules.Avatar.Friends 52namespace OpenSim.Region.CoreModules.Avatar.Friends
52{ 53{
54 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FriendsModule")]
53 public class FriendsModule : ISharedRegionModule, IFriendsModule 55 public class FriendsModule : ISharedRegionModule, IFriendsModule
54 { 56 {
55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index 06f27e2..bf5c0bb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -46,6 +46,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
46 46
47namespace OpenSim.Region.CoreModules.Avatar.Friends 47namespace OpenSim.Region.CoreModules.Avatar.Friends
48{ 48{
49 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGFriendsModule")]
49 public class HGFriendsModule : FriendsModule, ISharedRegionModule, IFriendsModule, IFriendsSimConnector 50 public class HGFriendsModule : FriendsModule, ISharedRegionModule, IFriendsModule, IFriendsSimConnector
50 { 51 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
index 7a197f7..961117e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
@@ -40,7 +40,7 @@ using OpenSim.Tests.Common.Mock;
40namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests 40namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
41{ 41{
42 [TestFixture] 42 [TestFixture]
43 public class FriendsModuleTests 43 public class FriendsModuleTests : OpenSimTestCase
44 { 44 {
45 private FriendsModule m_fm; 45 private FriendsModule m_fm;
46 private TestScene m_scene; 46 private TestScene m_scene;
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
index 7df2beb..095c57b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Reflection; 29using System.Reflection;
29using log4net; 30using log4net;
30using Nini.Config; 31using Nini.Config;
@@ -35,26 +36,46 @@ using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 36using OpenSim.Region.Framework.Scenes;
36using OpenSim.Services.Interfaces; 37using OpenSim.Services.Interfaces;
37 38
39using Mono.Addins;
40
38namespace OpenSim.Region.CoreModules.Avatar.Gestures 41namespace OpenSim.Region.CoreModules.Avatar.Gestures
39{ 42{
40 public class GesturesModule : IRegionModule 43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GesturesModule")]
44 public class GesturesModule : INonSharedRegionModule
41 { 45 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 47
44 protected Scene m_scene; 48 protected Scene m_scene;
45 49
46 public void Initialise(Scene scene, IConfigSource source) 50 public void Initialise(IConfigSource source)
51 {
52 }
53
54 public void AddRegion(Scene scene)
47 { 55 {
48 m_scene = scene; 56 m_scene = scene;
49 57
50 m_scene.EventManager.OnNewClient += OnNewClient; 58 m_scene.EventManager.OnNewClient += OnNewClient;
51 } 59 }
60
61 public void RegionLoaded(Scene scene)
62 {
63 }
64
65 public void RemoveRegion(Scene scene)
66 {
67 m_scene.EventManager.OnNewClient -= OnNewClient;
68 m_scene = null;
69 }
52 70
53 public void PostInitialise() {}
54 public void Close() {} 71 public void Close() {}
55 public string Name { get { return "Gestures Module"; } } 72 public string Name { get { return "Gestures Module"; } }
56 public bool IsSharedModule { get { return false; } } 73
57 74 public Type ReplaceableInterface
75 {
76 get { return null; }
77 }
78
58 private void OnNewClient(IClientAPI client) 79 private void OnNewClient(IClientAPI client)
59 { 80 {
60 client.OnActivateGesture += ActivateGesture; 81 client.OnActivateGesture += ActivateGesture;
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index 2e3312f..5a7446f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using Nini.Config; 30using Nini.Config;
30using OpenMetaverse; 31using OpenMetaverse;
@@ -32,29 +33,59 @@ using OpenSim.Framework;
32using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
33using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
34 35
36using Mono.Addins;
37
35namespace OpenSim.Region.CoreModules.Avatar.Gods 38namespace OpenSim.Region.CoreModules.Avatar.Gods
36{ 39{
37 public class GodsModule : IRegionModule, IGodsModule 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GodsModule")]
41 public class GodsModule : INonSharedRegionModule, IGodsModule
38 { 42 {
39 /// <summary>Special UUID for actions that apply to all agents</summary> 43 /// <summary>Special UUID for actions that apply to all agents</summary>
40 private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb"); 44 private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb");
41 45
42 protected Scene m_scene; 46 protected Scene m_scene;
43 protected IDialogModule m_dialogModule; 47 protected IDialogModule m_dialogModule;
44 48 protected IDialogModule DialogModule
45 public void Initialise(Scene scene, IConfigSource source) 49 {
50 get
51 {
52 if (m_dialogModule == null)
53 m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
54
55 return m_dialogModule;
56 }
57 }
58
59 public void Initialise(IConfigSource source)
60 {
61 }
62
63 public void AddRegion(Scene scene)
46 { 64 {
47 m_scene = scene; 65 m_scene = scene;
48 m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
49 m_scene.RegisterModuleInterface<IGodsModule>(this); 66 m_scene.RegisterModuleInterface<IGodsModule>(this);
50 m_scene.EventManager.OnNewClient += SubscribeToClientEvents; 67 m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
51 } 68 }
52 69
53 public void PostInitialise() {} 70 public void RemoveRegion(Scene scene)
71 {
72 m_scene.UnregisterModuleInterface<IGodsModule>(this);
73 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
74 m_scene = null;
75 }
76
77 public void RegionLoaded(Scene scene)
78 {
79 }
80
54 public void Close() {} 81 public void Close() {}
55 public string Name { get { return "Gods Module"; } } 82 public string Name { get { return "Gods Module"; } }
56 public bool IsSharedModule { get { return false; } } 83
57 84 public Type ReplaceableInterface
85 {
86 get { return null; }
87 }
88
58 public void SubscribeToClientEvents(IClientAPI client) 89 public void SubscribeToClientEvents(IClientAPI client)
59 { 90 {
60 client.OnGodKickUser += KickUser; 91 client.OnGodKickUser += KickUser;
@@ -96,8 +127,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
96 } 127 }
97 else 128 else
98 { 129 {
99 if (m_dialogModule != null) 130 if (DialogModule != null)
100 m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied"); 131 DialogModule.SendAlertToUser(agentID, "Request for god powers denied");
101 } 132 }
102 } 133 }
103 } 134 }
@@ -162,20 +193,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
162 if (kickflags == 1) 193 if (kickflags == 1)
163 { 194 {
164 sp.AllowMovement = false; 195 sp.AllowMovement = false;
165 m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); 196 if (DialogModule != null)
166 m_dialogModule.SendAlertToUser(godID, "User Frozen"); 197 {
198 DialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
199 DialogModule.SendAlertToUser(godID, "User Frozen");
200 }
167 } 201 }
168 202
169 if (kickflags == 2) 203 if (kickflags == 2)
170 { 204 {
171 sp.AllowMovement = true; 205 sp.AllowMovement = true;
172 m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); 206 if (DialogModule != null)
173 m_dialogModule.SendAlertToUser(godID, "User Unfrozen"); 207 {
208 DialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
209 DialogModule.SendAlertToUser(godID, "User Unfrozen");
210 }
174 } 211 }
175 } 212 }
176 else 213 else
177 { 214 {
178 m_dialogModule.SendAlertToUser(godID, "Kick request denied"); 215 if (DialogModule != null)
216 DialogModule.SendAlertToUser(godID, "Kick request denied");
179 } 217 }
180 } 218 }
181 } 219 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
index b258e13..af54c1a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using System.Reflection; 30using System.Reflection;
30using log4net; 31using log4net;
@@ -34,9 +35,12 @@ using OpenSim.Framework;
34using OpenSim.Region.Framework.Interfaces; 35using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 36using OpenSim.Region.Framework.Scenes;
36 37
38using Mono.Addins;
39
37namespace OpenSim.Region.CoreModules.Avatar.Groups 40namespace OpenSim.Region.CoreModules.Avatar.Groups
38{ 41{
39 public class GroupsModule : IRegionModule 42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GroupsModule")]
43 public class GroupsModule : ISharedRegionModule
40 { 44 {
41 private static readonly ILog m_log = 45 private static readonly ILog m_log =
42 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -55,9 +59,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
55 private static GroupMembershipData osGroup = 59 private static GroupMembershipData osGroup =
56 new GroupMembershipData(); 60 new GroupMembershipData();
57 61
58 #region IRegionModule Members 62 private bool m_Enabled = false;
63
64 #region ISharedRegionModule Members
59 65
60 public void Initialise(Scene scene, IConfigSource config) 66 public void Initialise(IConfigSource config)
61 { 67 {
62 IConfig groupsConfig = config.Configs["Groups"]; 68 IConfig groupsConfig = config.Configs["Groups"];
63 69
@@ -67,7 +73,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
67 } 73 }
68 else 74 else
69 { 75 {
70 if (!groupsConfig.GetBoolean("Enabled", false)) 76 m_Enabled = groupsConfig.GetBoolean("Enabled", false);
77 if (!m_Enabled)
71 { 78 {
72 m_log.Info("[GROUPS]: Groups disabled in configuration"); 79 m_log.Info("[GROUPS]: Groups disabled in configuration");
73 return; 80 return;
@@ -77,6 +84,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
77 return; 84 return;
78 } 85 }
79 86
87 }
88
89 public void AddRegion(Scene scene)
90 {
91 if (!m_Enabled)
92 return;
93
80 lock (m_SceneList) 94 lock (m_SceneList)
81 { 95 {
82 if (!m_SceneList.Contains(scene)) 96 if (!m_SceneList.Contains(scene))
@@ -96,7 +110,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
96 110
97 scene.EventManager.OnNewClient += OnNewClient; 111 scene.EventManager.OnNewClient += OnNewClient;
98 scene.EventManager.OnClientClosed += OnClientClosed; 112 scene.EventManager.OnClientClosed += OnClientClosed;
99// scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 113 // scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
114 }
115
116 public void RemoveRegion(Scene scene)
117 {
118 if (!m_Enabled)
119 return;
120
121 lock (m_SceneList)
122 {
123 if (m_SceneList.Contains(scene))
124 m_SceneList.Remove(scene);
125 }
126
127 scene.EventManager.OnNewClient -= OnNewClient;
128 scene.EventManager.OnClientClosed -= OnClientClosed;
129 }
130
131 public void RegionLoaded(Scene scene)
132 {
100 } 133 }
101 134
102 public void PostInitialise() 135 public void PostInitialise()
@@ -105,6 +138,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
105 138
106 public void Close() 139 public void Close()
107 { 140 {
141 if (!m_Enabled)
142 return;
143
108// m_log.Debug("[GROUPS]: Shutting down group module."); 144// m_log.Debug("[GROUPS]: Shutting down group module.");
109 145
110 lock (m_ClientMap) 146 lock (m_ClientMap)
@@ -123,9 +159,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
123 get { return "GroupsModule"; } 159 get { return "GroupsModule"; }
124 } 160 }
125 161
126 public bool IsSharedModule 162 public Type ReplaceableInterface
127 { 163 {
128 get { return true; } 164 get { return null; }
129 } 165 }
130 166
131 #endregion 167 #endregion
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
index bf1d787..7bf19c2 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
@@ -48,7 +48,7 @@ using OpenSim.Server.Handlers.Hypergrid;
48 48
49namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 49namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
50{ 50{
51 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 51 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGMessageTransferModule")]
52 public class HGMessageTransferModule : ISharedRegionModule, IMessageTransferModule, IInstantMessageSimConnector 52 public class HGMessageTransferModule : ISharedRegionModule, IMessageTransferModule, IInstantMessageSimConnector
53 { 53 {
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index ca5d485..c33a296 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -28,6 +28,7 @@ using System;
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using Mono.Addins;
31using Nini.Config; 32using Nini.Config;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Framework; 34using OpenSim.Framework;
@@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes;
37 38
38namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 39namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
39{ 40{
41 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InstantMessageModule")]
40 public class InstantMessageModule : ISharedRegionModule 42 public class InstantMessageModule : ISharedRegionModule
41 { 43 {
42 private static readonly ILog m_log = LogManager.GetLogger( 44 private static readonly ILog m_log = LogManager.GetLogger(
@@ -49,7 +51,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
49 51
50 private readonly List<Scene> m_scenes = new List<Scene>(); 52 private readonly List<Scene> m_scenes = new List<Scene>();
51 53
52 #region IRegionModule Members 54 #region Region Module interface
53 55
54 private IMessageTransferModule m_TransferModule = null; 56 private IMessageTransferModule m_TransferModule = null;
55 57
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 596174b..3983369 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Addins;
33using Nini.Config; 34using Nini.Config;
34using Nwc.XmlRpc; 35using Nwc.XmlRpc;
35using OpenMetaverse; 36using OpenMetaverse;
@@ -43,6 +44,7 @@ using OpenSim.Services.Interfaces;
43 44
44namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 45namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
45{ 46{
47 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MessageTransferModule")]
46 public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule 48 public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule
47 { 49 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
index 24cbaeb..7ce2813 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
@@ -29,6 +29,7 @@ using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using Nini.Config; 31using Nini.Config;
32using Mono.Addins;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Framework; 34using OpenSim.Framework;
34using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
@@ -39,6 +40,7 @@ using OpenSim.Region.Framework.Scenes;
39 40
40namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 41namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
41{ 42{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MuteListModule")]
42 public class MuteListModule : ISharedRegionModule 44 public class MuteListModule : ISharedRegionModule
43 { 45 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index de25048..4aaf1fe 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -28,6 +28,7 @@ using System;
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using Mono.Addins;
31using Nini.Config; 32using Nini.Config;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Framework; 34using OpenSim.Framework;
@@ -39,6 +40,7 @@ using OpenSim.Region.Framework.Scenes;
39 40
40namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 41namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
41{ 42{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")]
42 public class OfflineMessageModule : ISharedRegionModule 44 public class OfflineMessageModule : ISharedRegionModule
43 { 45 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
index dd17f3c..4c678c2 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
@@ -33,6 +33,7 @@ using log4net;
33using Nini.Config; 33using Nini.Config;
34using Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenMetaverse; 35using OpenMetaverse;
36using Mono.Addins;
36using OpenSim.Framework; 37using OpenSim.Framework;
37using OpenSim.Region.Framework.Interfaces; 38using OpenSim.Region.Framework.Interfaces;
38using OpenSim.Region.Framework.Scenes; 39using OpenSim.Region.Framework.Scenes;
@@ -42,6 +43,7 @@ using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo;
42 43
43namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 44namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
44{ 45{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PresenceModule")]
45 public class PresenceModule : ISharedRegionModule, IPresenceModule 47 public class PresenceModule : ISharedRegionModule, IPresenceModule
46 { 48 {
47 private static readonly ILog m_log = LogManager.GetLogger( 49 private static readonly ILog m_log = LogManager.GetLogger(
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index ee10d04..5069803 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -411,18 +411,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
411 { 411 {
412// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId); 412// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId);
413 413
414 item.CreatorIdAsUuid = ospResolvedId; 414// item.CreatorIdAsUuid = ospResolvedId;
415 415
416 // Don't preserve the OSPA in the creator id (which actually gets persisted to the 416 // Don't preserve the OSPA in the creator id (which actually gets persisted to the
417 // database). Instead, replace with the UUID that we found. 417 // database). Instead, replace with the UUID that we found.
418 item.CreatorId = ospResolvedId.ToString(); 418 item.CreatorId = ospResolvedId.ToString();
419
420 item.CreatorData = string.Empty; 419 item.CreatorData = string.Empty;
421 } 420 }
422 else if (item.CreatorData == null || item.CreatorData == String.Empty) 421 else if (item.CreatorData == null || item.CreatorData == String.Empty)
423 { 422 {
424 item.CreatorId = m_userInfo.PrincipalID.ToString(); 423 item.CreatorId = m_userInfo.PrincipalID.ToString();
425 item.CreatorIdAsUuid = new UUID(item.CreatorId); 424// item.CreatorIdAsUuid = new UUID(item.CreatorId);
426 } 425 }
427 426
428 item.Owner = m_userInfo.PrincipalID; 427 item.Owner = m_userInfo.PrincipalID;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 6587ead..d0e88f6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
166 166
167 if (options.ContainsKey("verbose")) 167 if (options.ContainsKey("verbose"))
168 m_log.InfoFormat( 168 m_log.InfoFormat(
169 "[INVENTORY ARCHIVER]: Saving item {0} {1} with asset {2}", 169 "[INVENTORY ARCHIVER]: Saving item {0} {1} (asset UUID {2})",
170 inventoryItem.ID, inventoryItem.Name, inventoryItem.AssetID); 170 inventoryItem.ID, inventoryItem.Name, inventoryItem.AssetID);
171 171
172 string filename = path + CreateArchiveItemName(inventoryItem); 172 string filename = path + CreateArchiveItemName(inventoryItem);
@@ -337,11 +337,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
337 { 337 {
338 m_log.DebugFormat("[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetUuids.Count); 338 m_log.DebugFormat("[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetUuids.Count);
339 339
340 new AssetsRequest( 340 AssetsRequest ar
341 new AssetsArchiver(m_archiveWriter), 341 = new AssetsRequest(
342 m_assetUuids, m_scene.AssetService, 342 new AssetsArchiver(m_archiveWriter),
343 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, 343 m_assetUuids, m_scene.AssetService,
344 options, ReceivedAllAssets).Execute(); 344 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID,
345 options, ReceivedAllAssets);
346
347 Util.FireAndForget(o => ar.Execute());
345 } 348 }
346 else 349 else
347 { 350 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index cf87010..849449b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -35,23 +35,22 @@ using Nini.Config;
35using OpenMetaverse; 35using OpenMetaverse;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Communications; 37using OpenSim.Framework.Communications;
38using OpenSim.Framework.Console;
38using OpenSim.Region.Framework.Interfaces; 39using OpenSim.Region.Framework.Interfaces;
39using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
40using OpenSim.Services.Interfaces; 41using OpenSim.Services.Interfaces;
42using Mono.Addins;
41 43
42namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver 44namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
43{ 45{
44 /// <summary> 46 /// <summary>
45 /// This module loads and saves OpenSimulator inventory archives 47 /// This module loads and saves OpenSimulator inventory archives
46 /// </summary> 48 /// </summary>
47 public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule 49 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InventoryArchiverModule")]
50 public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule
48 { 51 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 53
51 public string Name { get { return "Inventory Archiver Module"; } }
52
53 public bool IsSharedModule { get { return true; } }
54
55 /// <value> 54 /// <value>
56 /// Enable or disable checking whether the iar user is actually logged in 55 /// Enable or disable checking whether the iar user is actually logged in
57 /// </value> 56 /// </value>
@@ -98,9 +97,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
98// public InventoryArchiverModule(bool disablePresenceChecks) 97// public InventoryArchiverModule(bool disablePresenceChecks)
99// { 98// {
100// DisablePresenceChecks = disablePresenceChecks; 99// DisablePresenceChecks = disablePresenceChecks;
101// } 100 // }
101
102 #region ISharedRegionModule
103
104 public void Initialise(IConfigSource source)
105 {
106 }
102 107
103 public void Initialise(Scene scene, IConfigSource source) 108 public void AddRegion(Scene scene)
104 { 109 {
105 if (m_scenes.Count == 0) 110 if (m_scenes.Count == 0)
106 { 111 {
@@ -143,10 +148,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
143 m_scenes[scene.RegionInfo.RegionID] = scene; 148 m_scenes[scene.RegionInfo.RegionID] = scene;
144 } 149 }
145 150
146 public void PostInitialise() {} 151 public void RemoveRegion(Scene scene)
152 {
153 }
147 154
148 public void Close() {} 155 public void Close() {}
149 156
157 public void RegionLoaded(Scene scene)
158 {
159 }
160
161 public void PostInitialise()
162 {
163 }
164
165 public Type ReplaceableInterface
166 {
167 get { return null; }
168 }
169
170 public string Name { get { return "Inventory Archiver Module"; } }
171
172 #endregion
173
150 /// <summary> 174 /// <summary>
151 /// Trigger the inventory archive saved event. 175 /// Trigger the inventory archive saved event.
152 /// </summary> 176 /// </summary>
@@ -209,6 +233,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
209 Guid id, string firstName, string lastName, string invPath, string pass, string savePath, 233 Guid id, string firstName, string lastName, string invPath, string pass, string savePath,
210 Dictionary<string, object> options) 234 Dictionary<string, object> options)
211 { 235 {
236// if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, savePath))
237// return false;
238
212 if (m_scenes.Count > 0) 239 if (m_scenes.Count > 0)
213 { 240 {
214 UserAccount userInfo = GetUserInfo(firstName, lastName, pass); 241 UserAccount userInfo = GetUserInfo(firstName, lastName, pass);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index 1056865..db78da9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -82,7 +82,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
82 82
83 protected string m_item1Name = "Ray Gun Item"; 83 protected string m_item1Name = "Ray Gun Item";
84 protected string m_coaItemName = "Coalesced Item"; 84 protected string m_coaItemName = "Coalesced Item";
85 85
86 [TestFixtureSetUp]
87 public void FixtureSetup()
88 {
89 // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread.
90 Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest;
91
92 ConstructDefaultIarBytesForTestLoad();
93 }
94
95 [TestFixtureTearDown]
96 public void TearDown()
97 {
98 // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple
99 // threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression
100 // tests really shouldn't).
101 Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod;
102 }
103
86 [SetUp] 104 [SetUp]
87 public override void SetUp() 105 public override void SetUp()
88 { 106 {
@@ -90,12 +108,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
90 m_iarStream = new MemoryStream(m_iarStreamBytes); 108 m_iarStream = new MemoryStream(m_iarStreamBytes);
91 } 109 }
92 110
93 [TestFixtureSetUp]
94 public void FixtureSetup()
95 {
96 ConstructDefaultIarBytesForTestLoad();
97 }
98
99 protected void ConstructDefaultIarBytesForTestLoad() 111 protected void ConstructDefaultIarBytesForTestLoad()
100 { 112 {
101// log4net.Config.XmlConfigurator.Configure(); 113// log4net.Config.XmlConfigurator.Configure();
@@ -122,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
122 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); 134 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
123 item1.AssetID = asset1.FullID; 135 item1.AssetID = asset1.FullID;
124 item1.GroupID = UUID.Random(); 136 item1.GroupID = UUID.Random();
125 item1.CreatorIdAsUuid = m_uaLL1.PrincipalID; 137 item1.CreatorId = m_uaLL1.PrincipalID.ToString();
126 item1.Owner = m_uaLL1.PrincipalID; 138 item1.Owner = m_uaLL1.PrincipalID;
127 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 139 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
128 scene.AddInventoryItem(item1); 140 scene.AddInventoryItem(item1);
@@ -145,7 +157,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
145 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); 157 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180");
146 coaItem.AssetID = coaAsset.FullID; 158 coaItem.AssetID = coaAsset.FullID;
147 coaItem.GroupID = UUID.Random(); 159 coaItem.GroupID = UUID.Random();
148 coaItem.CreatorIdAsUuid = m_uaLL1.PrincipalID; 160 coaItem.CreatorId = m_uaLL1.PrincipalID.ToString();
149 coaItem.Owner = m_uaLL1.PrincipalID; 161 coaItem.Owner = m_uaLL1.PrincipalID;
150 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 162 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
151 scene.AddInventoryItem(coaItem); 163 scene.AddInventoryItem(coaItem);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 12a05b3..06f6e49 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
49{ 49{
50 [TestFixture] 50 [TestFixture]
51 public class InventoryArchiverTests : InventoryArchiveTestCase 51 public class InventoryArchiverTests : InventoryArchiveTestCase
52 { 52 {
53 protected TestScene m_scene; 53 protected TestScene m_scene;
54 protected InventoryArchiverModule m_archiverModule; 54 protected InventoryArchiverModule m_archiverModule;
55 55
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
69 public void TestLoadCoalesecedItem() 69 public void TestLoadCoalesecedItem()
70 { 70 {
71 TestHelpers.InMethod(); 71 TestHelpers.InMethod();
72// log4net.Config.XmlConfigurator.Configure(); 72// TestHelpers.EnableLogging();
73 73
74 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password"); 74 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password");
75 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); 75 m_archiverModule.DearchiveInventory(m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 33b4839..582aac4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using log4net; 31using log4net;
32using Mono.Addins;
32using Nini.Config; 33using Nini.Config;
33using OpenMetaverse; 34using OpenMetaverse;
34using OpenSim.Framework; 35using OpenSim.Framework;
@@ -38,20 +39,21 @@ using OpenSim.Services.Interfaces;
38 39
39namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer 40namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
40{ 41{
41 public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule 42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "InventoryTransferModule")]
43 public class InventoryTransferModule : ISharedRegionModule
42 { 44 {
43 private static readonly ILog m_log 45 private static readonly ILog m_log
44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 47
46 /// <summary> 48 /// <summary>
47 private List<Scene> m_Scenelist = new List<Scene>(); 49 private List<Scene> m_Scenelist = new List<Scene>();
48 private Dictionary<UUID, Scene> m_AgentRegions = 50// private Dictionary<UUID, Scene> m_AgentRegions =
49 new Dictionary<UUID, Scene>(); 51// new Dictionary<UUID, Scene>();
50 52
51 private IMessageTransferModule m_TransferModule = null; 53 private IMessageTransferModule m_TransferModule = null;
52 private bool m_Enabled = true; 54 private bool m_Enabled = true;
53 55
54 #region IRegionModule Members 56 #region Region Module interface
55 57
56 public void Initialise(IConfigSource config) 58 public void Initialise(IConfigSource config)
57 { 59 {
@@ -76,12 +78,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
76 78
77 m_Scenelist.Add(scene); 79 m_Scenelist.Add(scene);
78 80
79 scene.RegisterModuleInterface<IInventoryTransferModule>(this); 81// scene.RegisterModuleInterface<IInventoryTransferModule>(this);
80 82
81 scene.EventManager.OnNewClient += OnNewClient; 83 scene.EventManager.OnNewClient += OnNewClient;
82 scene.EventManager.OnClientClosed += ClientLoggedOut; 84// scene.EventManager.OnClientClosed += ClientLoggedOut;
83 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 85 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
84 scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene; 86// scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
85 } 87 }
86 88
87 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
@@ -96,9 +98,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
96 98
97 m_Scenelist.Clear(); 99 m_Scenelist.Clear();
98 scene.EventManager.OnNewClient -= OnNewClient; 100 scene.EventManager.OnNewClient -= OnNewClient;
99 scene.EventManager.OnClientClosed -= ClientLoggedOut; 101// scene.EventManager.OnClientClosed -= ClientLoggedOut;
100 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; 102 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
101 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; 103// scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
102 } 104 }
103 } 105 }
104 } 106 }
@@ -106,9 +108,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
106 public void RemoveRegion(Scene scene) 108 public void RemoveRegion(Scene scene)
107 { 109 {
108 scene.EventManager.OnNewClient -= OnNewClient; 110 scene.EventManager.OnNewClient -= OnNewClient;
109 scene.EventManager.OnClientClosed -= ClientLoggedOut; 111// scene.EventManager.OnClientClosed -= ClientLoggedOut;
110 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; 112 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
111 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; 113// scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
112 m_Scenelist.Remove(scene); 114 m_Scenelist.Remove(scene);
113 } 115 }
114 116
@@ -138,10 +140,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
138 client.OnInstantMessage += OnInstantMessage; 140 client.OnInstantMessage += OnInstantMessage;
139 } 141 }
140 142
141 protected void OnSetRootAgentScene(UUID id, Scene scene) 143// protected void OnSetRootAgentScene(UUID id, Scene scene)
142 { 144// {
143 m_AgentRegions[id] = scene; 145// m_AgentRegions[id] = scene;
144 } 146// }
145 147
146 private Scene FindClientScene(UUID agentId) 148 private Scene FindClientScene(UUID agentId)
147 { 149 {
@@ -298,73 +300,76 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
298 } 300 }
299 } 301 }
300 302
301 // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name> 303 // Disabled for now as it looks like http://opensimulator.org/mantis/view.php?id=6311 was fixed by fixes
302 // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis 304 // to inventory folder versioning allowing the viewer to move the received folder itself as happens on the
303 // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously 305 // LL grid. Doing it again server-side then wrongly does a second create and move
304 // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here. 306// // XXX: This code was placed here to try and accomdate RLV which moves given folders named #RLV/~<name>
305 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) 307// // to a folder called name in #RLV. However, this approach may not be ultimately correct - from analysis
306 { 308// // of Firestorm 4.2.2 on sending an InventoryOffered instead of TaskInventoryOffered (as was previously
307 UUID destinationFolderID = UUID.Zero; 309// // done), the viewer itself would appear to move and rename the folder, rather than the simulator doing it here.
308 310// else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
309 if (im.binaryBucket != null && im.binaryBucket.Length >= 16) 311// {
310 { 312// UUID destinationFolderID = UUID.Zero;
311 destinationFolderID = new UUID(im.binaryBucket, 0); 313//
312 } 314// if (im.binaryBucket != null && im.binaryBucket.Length >= 16)
313 315// {
314 if (destinationFolderID != UUID.Zero) 316// destinationFolderID = new UUID(im.binaryBucket, 0);
315 { 317// }
316 InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId); 318//
317 if (destinationFolder == null) 319// if (destinationFolderID != UUID.Zero)
318 { 320// {
319 m_log.WarnFormat( 321// InventoryFolderBase destinationFolder = new InventoryFolderBase(destinationFolderID, client.AgentId);
320 "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist", 322// if (destinationFolder == null)
321 client.Name, scene.Name, destinationFolderID); 323// {
322 324// m_log.WarnFormat(
323 return; 325// "[INVENTORY TRANSFER]: TaskInventoryAccepted message from {0} in {1} specified folder {2} which does not exist",
324 } 326// client.Name, scene.Name, destinationFolderID);
325 327//
326 IInventoryService invService = scene.InventoryService; 328// return;
327 329// }
328 UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip 330//
329 331// IInventoryService invService = scene.InventoryService;
330 InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); 332//
331 item = invService.GetItem(item); 333// UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip
332 InventoryFolderBase folder = null; 334//
333 UUID? previousParentFolderID = null; 335// InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId);
334 336// item = invService.GetItem(item);
335 if (item != null) // It's an item 337// InventoryFolderBase folder = null;
336 { 338// UUID? previousParentFolderID = null;
337 previousParentFolderID = item.Folder; 339//
338 item.Folder = destinationFolderID; 340// if (item != null) // It's an item
339 341// {
340 invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); 342// previousParentFolderID = item.Folder;
341 scene.AddInventoryItem(client, item); 343// item.Folder = destinationFolderID;
342 } 344//
343 else 345// invService.DeleteItems(item.Owner, new List<UUID>() { item.ID });
344 { 346// scene.AddInventoryItem(client, item);
345 folder = new InventoryFolderBase(inventoryID, client.AgentId); 347// }
346 folder = invService.GetFolder(folder); 348// else
347 349// {
348 if (folder != null) // It's a folder 350// folder = new InventoryFolderBase(inventoryID, client.AgentId);
349 { 351// folder = invService.GetFolder(folder);
350 previousParentFolderID = folder.ParentID; 352//
351 folder.ParentID = destinationFolderID; 353// if (folder != null) // It's a folder
352 invService.MoveFolder(folder); 354// {
353 } 355// previousParentFolderID = folder.ParentID;
354 } 356// folder.ParentID = destinationFolderID;
355 357// invService.MoveFolder(folder);
356 // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code). 358// }
357 if (previousParentFolderID != null) 359// }
358 { 360//
359 InventoryFolderBase previousParentFolder 361// // Tell client about updates to original parent and new parent (this should probably be factored with existing move item/folder code).
360 = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId); 362// if (previousParentFolderID != null)
361 previousParentFolder = invService.GetFolder(previousParentFolder); 363// {
362 scene.SendInventoryUpdate(client, previousParentFolder, true, true); 364// InventoryFolderBase previousParentFolder
363 365// = new InventoryFolderBase((UUID)previousParentFolderID, client.AgentId);
364 scene.SendInventoryUpdate(client, destinationFolder, true, true); 366// previousParentFolder = invService.GetFolder(previousParentFolder);
365 } 367// scene.SendInventoryUpdate(client, previousParentFolder, true, true);
366 } 368//
367 } 369// scene.SendInventoryUpdate(client, destinationFolder, true, true);
370// }
371// }
372// }
368 else if ( 373 else if (
369 im.dialog == (byte)InstantMessageDialog.InventoryDeclined 374 im.dialog == (byte)InstantMessageDialog.InventoryDeclined
370 || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) 375 || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined)
@@ -434,83 +439,86 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
434 scene.SendInventoryUpdate(client, trashFolder, true, true); 439 scene.SendInventoryUpdate(client, trashFolder, true, true);
435 } 440 }
436 441
437 ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); 442 if (im.dialog == (byte)InstantMessageDialog.InventoryDeclined)
438
439 if (user != null) // Local
440 {
441 user.ControllingClient.SendInstantMessage(im);
442 }
443 else
444 {
445 if (m_TransferModule != null)
446 m_TransferModule.SendInstantMessage(im, delegate(bool success) {});
447 }
448 }
449 }
450
451 public bool NeedSceneCacheClear(UUID agentID, Scene scene)
452 {
453 if (!m_AgentRegions.ContainsKey(agentID))
454 {
455 // Since we can get here two ways, we need to scan
456 // the scenes here. This is somewhat more expensive
457 // but helps avoid a nasty bug
458 //
459
460 foreach (Scene s in m_Scenelist)
461 { 443 {
462 ScenePresence presence; 444 ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
463 445
464 if (s.TryGetScenePresence(agentID, out presence)) 446 if (user != null) // Local
465 { 447 {
466 // If the agent is in this scene, then we 448 user.ControllingClient.SendInstantMessage(im);
467 // are being called twice in a single 449 }
468 // teleport. This is wasteful of cycles 450 else
469 // but harmless due to this 2nd level check 451 {
470 // 452 if (m_TransferModule != null)
471 // If the agent is found in another scene 453 m_TransferModule.SendInstantMessage(im, delegate(bool success) { });
472 // then the list wasn't current
473 //
474 // If the agent is totally unknown, then what
475 // are we even doing here??
476 //
477 if (s == scene)
478 {
479 //m_log.Debug("[INVTRANSFERMOD]: s == scene. Returning true in " + scene.RegionInfo.RegionName);
480 return true;
481 }
482 else
483 {
484 //m_log.Debug("[INVTRANSFERMOD]: s != scene. Returning false in " + scene.RegionInfo.RegionName);
485 return false;
486 }
487 } 454 }
488 } 455 }
489 //m_log.Debug("[INVTRANSFERMOD]: agent not in scene. Returning true in " + scene.RegionInfo.RegionName);
490 return true;
491 }
492
493 // The agent is left in current Scene, so we must be
494 // going to another instance
495 //
496 if (m_AgentRegions[agentID] == scene)
497 {
498 //m_log.Debug("[INVTRANSFERMOD]: m_AgentRegions[agentID] == scene. Returning true in " + scene.RegionInfo.RegionName);
499 m_AgentRegions.Remove(agentID);
500 return true;
501 } 456 }
502
503 // Another region has claimed the agent
504 //
505 //m_log.Debug("[INVTRANSFERMOD]: last resort. Returning false in " + scene.RegionInfo.RegionName);
506 return false;
507 } 457 }
508 458
509 public void ClientLoggedOut(UUID agentID, Scene scene) 459// public bool NeedSceneCacheClear(UUID agentID, Scene scene)
510 { 460// {
511 if (m_AgentRegions.ContainsKey(agentID)) 461// if (!m_AgentRegions.ContainsKey(agentID))
512 m_AgentRegions.Remove(agentID); 462// {
513 } 463// // Since we can get here two ways, we need to scan
464// // the scenes here. This is somewhat more expensive
465// // but helps avoid a nasty bug
466// //
467//
468// foreach (Scene s in m_Scenelist)
469// {
470// ScenePresence presence;
471//
472// if (s.TryGetScenePresence(agentID, out presence))
473// {
474// // If the agent is in this scene, then we
475// // are being called twice in a single
476// // teleport. This is wasteful of cycles
477// // but harmless due to this 2nd level check
478// //
479// // If the agent is found in another scene
480// // then the list wasn't current
481// //
482// // If the agent is totally unknown, then what
483// // are we even doing here??
484// //
485// if (s == scene)
486// {
487// //m_log.Debug("[INVTRANSFERMOD]: s == scene. Returning true in " + scene.RegionInfo.RegionName);
488// return true;
489// }
490// else
491// {
492// //m_log.Debug("[INVTRANSFERMOD]: s != scene. Returning false in " + scene.RegionInfo.RegionName);
493// return false;
494// }
495// }
496// }
497// //m_log.Debug("[INVTRANSFERMOD]: agent not in scene. Returning true in " + scene.RegionInfo.RegionName);
498// return true;
499// }
500//
501// // The agent is left in current Scene, so we must be
502// // going to another instance
503// //
504// if (m_AgentRegions[agentID] == scene)
505// {
506// //m_log.Debug("[INVTRANSFERMOD]: m_AgentRegions[agentID] == scene. Returning true in " + scene.RegionInfo.RegionName);
507// m_AgentRegions.Remove(agentID);
508// return true;
509// }
510//
511// // Another region has claimed the agent
512// //
513// //m_log.Debug("[INVTRANSFERMOD]: last resort. Returning false in " + scene.RegionInfo.RegionName);
514// return false;
515// }
516//
517// public void ClientLoggedOut(UUID agentID, Scene scene)
518// {
519// if (m_AgentRegions.ContainsKey(agentID))
520// m_AgentRegions.Remove(agentID);
521// }
514 522
515 /// <summary> 523 /// <summary>
516 /// 524 ///
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
index 9c369f6..232a4fe 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
@@ -42,7 +42,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
42 42
43namespace OpenSim.Region.CoreModules.Avatar.Lure 43namespace OpenSim.Region.CoreModules.Avatar.Lure
44{ 44{
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "HGLureModule")]
46 public class HGLureModule : ISharedRegionModule 46 public class HGLureModule : ISharedRegionModule
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger( 48 private static readonly ILog m_log = LogManager.GetLogger(
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
index 6ce9556..e4b0cfa 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using log4net; 31using log4net;
32using Mono.Addins;
32using Nini.Config; 33using Nini.Config;
33using OpenMetaverse; 34using OpenMetaverse;
34using OpenSim.Framework; 35using OpenSim.Framework;
@@ -37,6 +38,7 @@ using OpenSim.Region.Framework.Scenes;
37 38
38namespace OpenSim.Region.CoreModules.Avatar.Lure 39namespace OpenSim.Region.CoreModules.Avatar.Lure
39{ 40{
41 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LureModule")]
40 public class LureModule : ISharedRegionModule 42 public class LureModule : ISharedRegionModule
41 { 43 {
42 private static readonly ILog m_log = LogManager.GetLogger( 44 private static readonly ILog m_log = LogManager.GetLogger(
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
index 87ca327..bf24030 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
@@ -42,7 +42,7 @@ using OpenSim.Services.Interfaces;
42 42
43namespace OpenSim.Region.CoreModules.Avatar.Profile 43namespace OpenSim.Region.CoreModules.Avatar.Profile
44{ 44{
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BasicProfileModule")]
46 public class BasicProfileModule : IProfileModule, ISharedRegionModule 46 public class BasicProfileModule : IProfileModule, ISharedRegionModule
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);