Adding a way to disable/enable the in built Dwell Module
parent
7f027552ec
commit
da25903300
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue