diff options
author | H-H-H | 2014-03-20 21:32:33 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-03-20 22:35:50 +0000 |
commit | da259033006c33f83872feae5737398fcffa6639 (patch) | |
tree | 73b95dda068a702aa6e3c12f362f7ba868853f60 | |
parent | If we find an existing suitcase folder in HGSuitcaseInventoryService.GetRootF... (diff) | |
download | opensim-SC-da259033006c33f83872feae5737398fcffa6639.zip opensim-SC-da259033006c33f83872feae5737398fcffa6639.tar.gz opensim-SC-da259033006c33f83872feae5737398fcffa6639.tar.bz2 opensim-SC-da259033006c33f83872feae5737398fcffa6639.tar.xz |
Adding a way to disable/enable the in built Dwell Module
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/DwellModule.cs | 20 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 3 |
2 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index bd22155..d17c517 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; | |||
52 | 52 | ||
53 | namespace OpenSim.Region.CoreModules.World.Land | 53 | namespace OpenSim.Region.CoreModules.World.Land |
54 | { | 54 | { |
55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DwellModule")] | 55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultDwellModule")] |
56 | public class DwellModule : IDwellModule, INonSharedRegionModule | 56 | public class DefaultDwellModule : IDwellModule, INonSharedRegionModule |
57 | { | 57 | { |
58 | private Scene m_scene; | 58 | private Scene m_scene; |
59 | private IConfigSource m_Config; | ||
60 | private bool m_Enabled = false; | ||
59 | 61 | ||
60 | public Type ReplaceableInterface | 62 | public Type ReplaceableInterface |
61 | { | 63 | { |
@@ -64,15 +66,27 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
64 | 66 | ||
65 | public string Name | 67 | public string Name |
66 | { | 68 | { |
67 | get { return "DwellModule"; } | 69 | get { return "DefaultDwellModule"; } |
68 | } | 70 | } |
69 | 71 | ||
70 | public void Initialise(IConfigSource source) | 72 | public void Initialise(IConfigSource source) |
71 | { | 73 | { |
74 | m_Config = source; | ||
75 | |||
76 | IConfig DwellConfig = m_Config.Configs ["Dwell"]; | ||
77 | |||
78 | if (DwellConfig == null) { | ||
79 | m_Enabled = false; | ||
80 | return; | ||
81 | } | ||
82 | m_Enabled = (DwellConfig.GetString ("DwellModule", "DefaultDwellModule") == "DefaultDwellModule"); | ||
72 | } | 83 | } |
73 | 84 | ||
74 | public void AddRegion(Scene scene) | 85 | public void AddRegion(Scene scene) |
75 | { | 86 | { |
87 | if (!m_Enabled) | ||
88 | return; | ||
89 | |||
76 | m_scene = scene; | 90 | m_scene = scene; |
77 | 91 | ||
78 | m_scene.EventManager.OnNewClient += OnNewClient; | 92 | m_scene.EventManager.OnNewClient += OnNewClient; |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index f59dbf2..d8474d3 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -1791,6 +1791,9 @@ | |||
1791 | ;; Default time interval (in ms) for the throttle service thread to wake up | 1791 | ;; Default time interval (in ms) for the throttle service thread to wake up |
1792 | Interval = 5000 | 1792 | Interval = 5000 |
1793 | 1793 | ||
1794 | [Dwell] | ||
1795 | ;; This enables the built in basic dwell module | ||
1796 | DwellModule = DefaultDwellModule | ||
1794 | 1797 | ||
1795 | [Modules] | 1798 | [Modules] |
1796 | Include-modules = "addon-modules/*/config/*.ini" | 1799 | Include-modules = "addon-modules/*/config/*.ini" |