From 8d36d7beed0f5bc932407671596d5a79ff8f8eb6 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 25 Dec 2009 23:10:07 +0000
Subject: Enable the profile module to be replaced completely, even for the
 base profile data

---
 .../CoreModules/Avatar/Profiles/AvatarProfilesModule.cs     | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'OpenSim/Region/CoreModules')

diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
index 0f58788..8cf58c6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -43,6 +43,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
         private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
         private Scene m_scene;
         private IProfileModule m_profileModule = null;
+        private bool m_enabled = true;
 
         public AvatarProfilesModule()
         {
@@ -52,12 +53,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
 
         public void Initialise(Scene scene, IConfigSource config)
         {
+            IConfig profileConfig = config.Configs["Profile"];
+            if (profileConfig != null)
+            {
+                if (profileConfig.GetString("Module", Name) != Name)
+                {
+                    m_enabled = false;
+                    return;
+                }
+            }
+
             m_scene = scene;
             m_scene.EventManager.OnNewClient += NewClient;
         }
 
         public void PostInitialise()
         {
+            if (!m_enabled)
+                return;
             m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
         }
 
-- 
cgit v1.1