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
|
namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DwellModule")]
|
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultDwellModule")]
|
||||||
public class DwellModule : IDwellModule, INonSharedRegionModule
|
public class DefaultDwellModule : IDwellModule, INonSharedRegionModule
|
||||||
{
|
{
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
private IConfigSource m_Config;
|
||||||
|
private bool m_Enabled = false;
|
||||||
|
|
||||||
public Type ReplaceableInterface
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
|
@ -64,15 +66,27 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "DwellModule"; }
|
get { return "DefaultDwellModule"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
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)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
if (!m_Enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
m_scene.EventManager.OnNewClient += OnNewClient;
|
m_scene.EventManager.OnNewClient += OnNewClient;
|
||||||
|
|
|
@ -1791,6 +1791,9 @@
|
||||||
;; Default time interval (in ms) for the throttle service thread to wake up
|
;; Default time interval (in ms) for the throttle service thread to wake up
|
||||||
Interval = 5000
|
Interval = 5000
|
||||||
|
|
||||||
|
[Dwell]
|
||||||
|
;; This enables the built in basic dwell module
|
||||||
|
DwellModule = DefaultDwellModule
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
Include-modules = "addon-modules/*/config/*.ini"
|
Include-modules = "addon-modules/*/config/*.ini"
|
||||||
|
|
Loading…
Reference in New Issue