aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorH-H-H2014-03-20 21:32:33 +0000
committerJustin Clark-Casey (justincc)2014-03-20 22:35:50 +0000
commitda259033006c33f83872feae5737398fcffa6639 (patch)
tree73b95dda068a702aa6e3c12f362f7ba868853f60 /OpenSim/Region/CoreModules/World
parentIf we find an existing suitcase folder in HGSuitcaseInventoryService.GetRootF... (diff)
downloadopensim-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
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/DwellModule.cs20
1 files changed, 17 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
53namespace OpenSim.Region.CoreModules.World.Land 53namespace 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;