diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index bd221550cc..d17c517289 100644 --- a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs @@ -52,10 +52,12 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.World.Land { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DwellModule")] - public class DwellModule : IDwellModule, INonSharedRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultDwellModule")] + public class DefaultDwellModule : IDwellModule, INonSharedRegionModule { private Scene m_scene; + private IConfigSource m_Config; + private bool m_Enabled = false; public Type ReplaceableInterface { @@ -64,15 +66,27 @@ namespace OpenSim.Region.CoreModules.World.Land public string Name { - get { return "DwellModule"; } + get { return "DefaultDwellModule"; } } public void Initialise(IConfigSource source) { + m_Config = source; + + IConfig DwellConfig = m_Config.Configs ["Dwell"]; + + if (DwellConfig == null) { + m_Enabled = false; + return; + } + m_Enabled = (DwellConfig.GetString ("DwellModule", "DefaultDwellModule") == "DefaultDwellModule"); } public void AddRegion(Scene scene) { + if (!m_Enabled) + return; + m_scene = scene; m_scene.EventManager.OnNewClient += OnNewClient; diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index f59dbf2d6e..d8474d3d37 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1791,6 +1791,9 @@ ;; Default time interval (in ms) for the throttle service thread to wake up Interval = 5000 +[Dwell] + ;; This enables the built in basic dwell module + DwellModule = DefaultDwellModule [Modules] Include-modules = "addon-modules/*/config/*.ini"