diff --git a/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectors/User/LocalUserServiceConnector.cs index 637931e2bd..37286bda0d 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 { if (!m_Enabled) return; + + scene.RegisterModuleInterface(m_UserService); } public void RemoveRegion(Scene scene) diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 4efcb63346..f49366ac89 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -368,19 +368,24 @@ namespace OpenSim.Region.Framework.Scenes /// public void RegisterModuleInterface(M mod) { - if (!ModuleInterfaces.ContainsKey(typeof(M))) + List l = null; + if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) { - List l = new List(); - l.Add(mod); + l = new List(); ModuleInterfaces.Add(typeof(M), l); + } - if (mod is IEntityCreator) + if (l.Count > 0) + return; + + l.Add(mod); + + if (mod is IEntityCreator) + { + IEntityCreator entityCreator = (IEntityCreator)mod; + foreach (PCode pcode in entityCreator.CreationCapabilities) { - IEntityCreator entityCreator = (IEntityCreator)mod; - foreach (PCode pcode in entityCreator.CreationCapabilities) - { - m_entityCreators[pcode] = entityCreator; - } + m_entityCreators[pcode] = entityCreator; } } }