diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/DwellModule.cs | 20 |
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 | ||
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; |