aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs23
2 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
index 637931e..37286bd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs
@@ -107,6 +107,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User
107 { 107 {
108 if (!m_Enabled) 108 if (!m_Enabled)
109 return; 109 return;
110
111 scene.RegisterModuleInterface<IUserService>(m_UserService);
110 } 112 }
111 113
112 public void RemoveRegion(Scene scene) 114 public void RemoveRegion(Scene scene)
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 4efcb63..f49366a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -368,19 +368,24 @@ namespace OpenSim.Region.Framework.Scenes
368 /// <param name="mod"></param> 368 /// <param name="mod"></param>
369 public void RegisterModuleInterface<M>(M mod) 369 public void RegisterModuleInterface<M>(M mod)
370 { 370 {
371 if (!ModuleInterfaces.ContainsKey(typeof(M))) 371 List<Object> l = null;
372 if (!ModuleInterfaces.TryGetValue(typeof(M), out l))
372 { 373 {
373 List<Object> l = new List<Object>(); 374 l = new List<Object>();
374 l.Add(mod);
375 ModuleInterfaces.Add(typeof(M), l); 375 ModuleInterfaces.Add(typeof(M), l);
376 }
377
378 if (l.Count > 0)
379 return;
376 380
377 if (mod is IEntityCreator) 381 l.Add(mod);
382
383 if (mod is IEntityCreator)
384 {
385 IEntityCreator entityCreator = (IEntityCreator)mod;
386 foreach (PCode pcode in entityCreator.CreationCapabilities)
378 { 387 {
379 IEntityCreator entityCreator = (IEntityCreator)mod; 388 m_entityCreators[pcode] = entityCreator;
380 foreach (PCode pcode in entityCreator.CreationCapabilities)
381 {
382 m_entityCreators[pcode] = entityCreator;
383 }
384 } 389 }
385 } 390 }
386 } 391 }