diff options
author | Melanie | 2010-01-29 07:20:13 +0000 |
---|---|---|
committer | Melanie | 2010-01-29 07:21:06 +0000 |
commit | a87a247f0548d39a8c39b1d28123d7da8db44598 (patch) | |
tree | 7f9f77c38a224bc6d4bea7ccced1d4710c8a91b1 /OpenSim/Region/OptionalModules | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.zip opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.gz opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.bz2 opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.xz |
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to '')
12 files changed, 125 insertions, 254 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index ec040db..cfe1278 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | |||
@@ -25,11 +25,9 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Net; | 28 | using System.Net; |
30 | using System.Reflection; | 29 | using System.Reflection; |
31 | using log4net; | 30 | using log4net; |
32 | using Mono.Addins; | ||
33 | using Nini.Config; | 31 | using Nini.Config; |
34 | using OpenSim.Region.Framework.Interfaces; | 32 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
@@ -37,23 +35,24 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; | |||
37 | 35 | ||
38 | namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | 36 | namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView |
39 | { | 37 | { |
40 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 38 | public class IRCStackModule : IRegionModule |
41 | public class IRCStackModule : INonSharedRegionModule | ||
42 | { | 39 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 41 | ||
45 | private IRCServer m_server; | 42 | private IRCServer m_server; |
46 | // private Scene m_scene; | 43 | // private Scene m_scene; |
47 | private int portNo; | ||
48 | 44 | ||
49 | #region Implementation of ISharedRegionModule | 45 | #region Implementation of IRegionModule |
50 | 46 | ||
51 | public void Initialise(IConfigSource source) | 47 | public void Initialise(Scene scene, IConfigSource source) |
52 | { | 48 | { |
53 | if (null != source.Configs["IRCd"] && | 49 | if (null != source.Configs["IRCd"] && |
54 | source.Configs["IRCd"].GetBoolean("Enabled",false)) | 50 | source.Configs["IRCd"].GetBoolean("Enabled",false)) |
55 | { | 51 | { |
56 | portNo = source.Configs["IRCd"].GetInt("Port",6666); | 52 | int portNo = source.Configs["IRCd"].GetInt("Port",6666); |
53 | // m_scene = scene; | ||
54 | m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); | ||
55 | m_server.OnNewIRCClient += m_server_OnNewIRCClient; | ||
57 | } | 56 | } |
58 | } | 57 | } |
59 | 58 | ||
@@ -69,20 +68,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | |||
69 | m_log.Info("[IRCd] Added user to Scene"); | 68 | m_log.Info("[IRCd] Added user to Scene"); |
70 | } | 69 | } |
71 | 70 | ||
72 | public void AddRegion(Scene scene) | 71 | public void PostInitialise() |
73 | { | ||
74 | if (portNo != null) | ||
75 | { | ||
76 | m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); | ||
77 | m_server.OnNewIRCClient += m_server_OnNewIRCClient; | ||
78 | } | ||
79 | } | ||
80 | public void RegionLoaded(Scene scene) | ||
81 | { | 72 | { |
82 | } | ||
83 | 73 | ||
84 | public void RemoveRegion(Scene scene) | ||
85 | { | ||
86 | } | 74 | } |
87 | 75 | ||
88 | public void Close() | 76 | public void Close() |
@@ -95,9 +83,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | |||
95 | get { return "IRCClientStackModule"; } | 83 | get { return "IRCClientStackModule"; } |
96 | } | 84 | } |
97 | 85 | ||
98 | public Type ReplaceableInterface | 86 | public bool IsSharedModule |
99 | { | 87 | { |
100 | get { return null; } | 88 | get { return false; } |
101 | } | 89 | } |
102 | 90 | ||
103 | #endregion | 91 | #endregion |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 23ae307..b04b076 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -38,7 +38,6 @@ using System.Collections.Generic; | |||
38 | using System.Reflection; | 38 | using System.Reflection; |
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | using log4net; | 40 | using log4net; |
41 | using Mono.Addins; | ||
42 | using Nini.Config; | 41 | using Nini.Config; |
43 | using Nwc.XmlRpc; | 42 | using Nwc.XmlRpc; |
44 | using OpenSim.Framework; | 43 | using OpenSim.Framework; |
@@ -54,8 +53,7 @@ using System.Text.RegularExpressions; | |||
54 | 53 | ||
55 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | 54 | namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice |
56 | { | 55 | { |
57 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 56 | public class FreeSwitchVoiceModule : IRegionModule, IVoiceModule |
58 | public class FreeSwitchVoiceModule : ISharedRegionModule, IVoiceModule | ||
59 | { | 57 | { |
60 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
61 | 59 | ||
@@ -110,8 +108,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
110 | 108 | ||
111 | private IConfig m_config; | 109 | private IConfig m_config; |
112 | 110 | ||
113 | public void Initialise(IConfigSource config) | 111 | public void Initialise(Scene scene, IConfigSource config) |
114 | { | 112 | { |
113 | m_scene = scene; | ||
115 | m_config = config.Configs["FreeSwitchVoice"]; | 114 | m_config = config.Configs["FreeSwitchVoice"]; |
116 | 115 | ||
117 | if (null == m_config) | 116 | if (null == m_config) |
@@ -225,21 +224,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
225 | return; | 224 | return; |
226 | } | 225 | } |
227 | } | 226 | } |
228 | } | ||
229 | 227 | ||
230 | public void AddRegion(Scene scene) | 228 | if (m_pluginEnabled) |
231 | { | ||
232 | m_scene = scene; | ||
233 | if (m_pluginEnabled) | ||
234 | { | 229 | { |
235 | // we need to capture scene in an anonymous method | 230 | // we need to capture scene in an anonymous method |
236 | // here as we need it later in the callbacks | 231 | // here as we need it later in the callbacks |
237 | scene.EventManager.OnRegisterCaps += delegate(UUID agentID, Caps caps) | 232 | scene.EventManager.OnRegisterCaps += delegate(UUID agentID, Caps caps) |
238 | { | 233 | { |
239 | OnRegisterCaps(scene, agentID, caps); | 234 | OnRegisterCaps(scene, agentID, caps); |
240 | }; | 235 | }; |
241 | 236 | ||
242 | 237 | ||
243 | 238 | ||
244 | try | 239 | try |
245 | { | 240 | { |
@@ -259,53 +254,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
259 | m_log.Error("[FreeSwitchVoice]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); | 254 | m_log.Error("[FreeSwitchVoice]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); |
260 | } | 255 | } |
261 | } | 256 | } |
262 | 257 | ||
263 | } | 258 | } |
259 | } | ||
260 | |||
261 | public void PostInitialise() | ||
262 | { | ||
264 | if (m_pluginEnabled) | 263 | if (m_pluginEnabled) |
265 | { | 264 | { |
266 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); | 265 | m_log.Info("[FreeSwitchVoice] registering IVoiceModule with the scene"); |
267 | 266 | ||
268 | // register the voice interface for this module, so the script engine can call us | 267 | // register the voice interface for this module, so the script engine can call us |
269 | m_scene.RegisterModuleInterface<IVoiceModule>(this); | 268 | m_scene.RegisterModuleInterface<IVoiceModule>(this); |
270 | } | 269 | } |
271 | } | 270 | } |
272 | 271 | ||
273 | public void RegionLoaded(Scene scene) | ||
274 | { | ||
275 | } | ||
276 | |||
277 | public void RemoveRegion(Scene scene) | ||
278 | { | ||
279 | if (UseProxy) | ||
280 | { | ||
281 | MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/", m_freeSwitchAPIPrefix)); | ||
282 | } | ||
283 | else | ||
284 | { | ||
285 | MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix)); | ||
286 | |||
287 | MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix)); | ||
288 | |||
289 | MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix)); | ||
290 | |||
291 | MainServer.Instance.RemoveHTTPHandler("", String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix)); | ||
292 | } | ||
293 | scene.EventManager.OnRegisterCaps -= delegate(UUID agentID, Caps caps) | ||
294 | { | ||
295 | OnRegisterCaps(scene, agentID, caps); | ||
296 | }; | ||
297 | scene.UnregisterModuleInterface<IVoiceModule>(this); | ||
298 | } | ||
299 | |||
300 | public Type ReplaceableInterface | ||
301 | { | ||
302 | get { return null; } | ||
303 | } | ||
304 | |||
305 | public void PostInitialise() | ||
306 | { | ||
307 | } | ||
308 | |||
309 | public void Close() | 272 | public void Close() |
310 | { | 273 | { |
311 | } | 274 | } |
@@ -314,6 +277,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
314 | { | 277 | { |
315 | get { return "FreeSwitchVoiceModule"; } | 278 | get { return "FreeSwitchVoiceModule"; } |
316 | } | 279 | } |
280 | |||
281 | public bool IsSharedModule | ||
282 | { | ||
283 | get { return true; } | ||
284 | } | ||
317 | 285 | ||
318 | // <summary> | 286 | // <summary> |
319 | // implementation of IVoiceModule, called by osSetParcelSIPAddress script function | 287 | // implementation of IVoiceModule, called by osSetParcelSIPAddress script function |
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs index 6769d59..3d1c346 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -38,7 +38,6 @@ using System.Threading; | |||
38 | 38 | ||
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | 40 | ||
41 | using Mono.Addins; | ||
42 | using Nini.Config; | 41 | using Nini.Config; |
43 | 42 | ||
44 | using OpenSim; | 43 | using OpenSim; |
@@ -51,8 +50,7 @@ using log4net; | |||
51 | 50 | ||
52 | namespace OpenSim.Region.OptionalModules.ContentManagement | 51 | namespace OpenSim.Region.OptionalModules.ContentManagement |
53 | { | 52 | { |
54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 53 | public class ContentManagementModule : IRegionModule |
55 | public class ContentManagementModule : ISharedRegionModule | ||
56 | { | 54 | { |
57 | #region Static Fields | 55 | #region Static Fields |
58 | 56 | ||
@@ -62,20 +60,22 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
62 | 60 | ||
63 | #region Fields | 61 | #region Fields |
64 | 62 | ||
65 | private bool initialised = false; | 63 | bool initialised = false; |
66 | private CMController m_control = null; | 64 | CMController m_control = null; |
67 | private bool m_enabled = false; | 65 | bool m_enabled = false; |
68 | private CMModel m_model = null; | 66 | CMModel m_model = null; |
69 | private bool m_posted = false; | 67 | bool m_posted = false; |
70 | private CMView m_view = null; | 68 | CMView m_view = null; |
71 | private string databaseDir = "./"; | ||
72 | private string database = "FileSystemDatabase"; | ||
73 | private int channel = 345; | ||
74 | 69 | ||
75 | #endregion Fields | 70 | #endregion Fields |
76 | 71 | ||
77 | #region Public Properties | 72 | #region Public Properties |
78 | 73 | ||
74 | public bool IsSharedModule | ||
75 | { | ||
76 | get { return true; } | ||
77 | } | ||
78 | |||
79 | public string Name | 79 | public string Name |
80 | { | 80 | { |
81 | get { return "ContentManagementModule"; } | 81 | get { return "ContentManagementModule"; } |
@@ -89,8 +89,11 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
89 | { | 89 | { |
90 | } | 90 | } |
91 | 91 | ||
92 | public void Initialise(IConfigSource source) | 92 | public void Initialise(Scene scene, IConfigSource source) |
93 | { | 93 | { |
94 | string databaseDir = "./"; | ||
95 | string database = "FileSystemDatabase"; | ||
96 | int channel = 345; | ||
94 | try | 97 | try |
95 | { | 98 | { |
96 | if (source.Configs["CMS"] == null) | 99 | if (source.Configs["CMS"] == null) |
@@ -112,15 +115,13 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
112 | m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); | 115 | m_log.ErrorFormat("[Content Management]: Exception thrown while reading parameters from configuration file. Message: " + e); |
113 | m_enabled = false; | 116 | m_enabled = false; |
114 | } | 117 | } |
115 | } | ||
116 | 118 | ||
117 | public void AddRegion(Scene scene) | ||
118 | { | ||
119 | if (!m_enabled) | 119 | if (!m_enabled) |
120 | { | 120 | { |
121 | m_log.Info("[Content Management]: Content Management System is not Enabled."); | 121 | m_log.Info("[Content Management]: Content Management System is not Enabled."); |
122 | return; | 122 | return; |
123 | } | 123 | } |
124 | |||
124 | lock (this) | 125 | lock (this) |
125 | { | 126 | { |
126 | if (!initialised) //only init once | 127 | if (!initialised) //only init once |
@@ -141,18 +142,6 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
141 | } | 142 | } |
142 | } | 143 | } |
143 | } | 144 | } |
144 | public void RegionLoaded(Scene scene) | ||
145 | { | ||
146 | } | ||
147 | |||
148 | public void RemoveRegion(Scene scene) | ||
149 | { | ||
150 | } | ||
151 | |||
152 | public Type ReplaceableInterface | ||
153 | { | ||
154 | get { return null; } | ||
155 | } | ||
156 | 145 | ||
157 | public void PostInitialise() | 146 | public void PostInitialise() |
158 | { | 147 | { |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index f24bcdc..4521f8e 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -38,7 +38,6 @@ using System.Security.Policy; | |||
38 | using System.Text; | 38 | using System.Text; |
39 | using log4net; | 39 | using log4net; |
40 | using Microsoft.CSharp; | 40 | using Microsoft.CSharp; |
41 | using Mono.Addins; | ||
42 | using Nini.Config; | 41 | using Nini.Config; |
43 | using OpenMetaverse; | 42 | using OpenMetaverse; |
44 | using OpenSim.Framework; | 43 | using OpenSim.Framework; |
@@ -47,8 +46,7 @@ using OpenSim.Region.Framework.Scenes; | |||
47 | 46 | ||
48 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 47 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
49 | { | 48 | { |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 49 | public class MRMModule : IRegionModule, IMRMModule |
51 | public class MRMModule : INonSharedRegionModule, IMRMModule | ||
52 | { | 50 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | private Scene m_scene; | 52 | private Scene m_scene; |
@@ -64,14 +62,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
64 | 62 | ||
65 | private IConfig m_config; | 63 | private IConfig m_config; |
66 | 64 | ||
67 | private bool m_hidden = true; | ||
68 | |||
69 | public void RegisterExtension<T>(T instance) | 65 | public void RegisterExtension<T>(T instance) |
70 | { | 66 | { |
71 | m_extensions[typeof (T)] = instance; | 67 | m_extensions[typeof (T)] = instance; |
72 | } | 68 | } |
73 | 69 | ||
74 | public void Initialise(IConfigSource source) | 70 | public void Initialise(Scene scene, IConfigSource source) |
75 | { | 71 | { |
76 | if (source.Configs["MRM"] != null) | 72 | if (source.Configs["MRM"] != null) |
77 | { | 73 | { |
@@ -80,10 +76,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
80 | if (source.Configs["MRM"].GetBoolean("Enabled", false)) | 76 | if (source.Configs["MRM"].GetBoolean("Enabled", false)) |
81 | { | 77 | { |
82 | m_log.Info("[MRM] Enabling MRM Module"); | 78 | m_log.Info("[MRM] Enabling MRM Module"); |
83 | 79 | m_scene = scene; | |
80 | |||
84 | // when hidden, we don't listen for client initiated script events | 81 | // when hidden, we don't listen for client initiated script events |
85 | // only making the MRM engine available for region modules | 82 | // only making the MRM engine available for region modules |
86 | m_hidden = source.Configs["MRM"].GetBoolean("Hidden", false); | 83 | if (!source.Configs["MRM"].GetBoolean("Hidden", false)) |
84 | { | ||
85 | scene.EventManager.OnRezScript += EventManager_OnRezScript; | ||
86 | scene.EventManager.OnStopScript += EventManager_OnStopScript; | ||
87 | } | ||
88 | |||
89 | scene.EventManager.OnFrame += EventManager_OnFrame; | ||
90 | |||
91 | scene.RegisterModuleInterface<IMRMModule>(this); | ||
87 | } | 92 | } |
88 | else | 93 | else |
89 | { | 94 | { |
@@ -96,39 +101,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
96 | } | 101 | } |
97 | } | 102 | } |
98 | 103 | ||
99 | public Type ReplaceableInterface | ||
100 | { | ||
101 | get { return null; } | ||
102 | } | ||
103 | |||
104 | public void AddRegion(Scene scene) | ||
105 | { | ||
106 | m_scene = scene; | ||
107 | if (!m_hidden) | ||
108 | { | ||
109 | scene.EventManager.OnRezScript += EventManager_OnRezScript; | ||
110 | scene.EventManager.OnStopScript += EventManager_OnStopScript; | ||
111 | } | ||
112 | scene.EventManager.OnFrame += EventManager_OnFrame; | ||
113 | |||
114 | scene.RegisterModuleInterface<IMRMModule>(this); | ||
115 | } | ||
116 | public void RegionLoaded(Scene scene) | ||
117 | { | ||
118 | } | ||
119 | |||
120 | public void RemoveRegion(Scene scene) | ||
121 | { | ||
122 | if (!m_hidden) | ||
123 | { | ||
124 | scene.EventManager.OnRezScript -= EventManager_OnRezScript; | ||
125 | scene.EventManager.OnStopScript -= EventManager_OnStopScript; | ||
126 | } | ||
127 | scene.EventManager.OnFrame -= EventManager_OnFrame; | ||
128 | |||
129 | scene.UnregisterModuleInterface<IMRMModule>(this); | ||
130 | } | ||
131 | |||
132 | void EventManager_OnStopScript(uint localID, UUID itemID) | 104 | void EventManager_OnStopScript(uint localID, UUID itemID) |
133 | { | 105 | { |
134 | if (m_scripts.ContainsKey(itemID)) | 106 | if (m_scripts.ContainsKey(itemID)) |
@@ -330,6 +302,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
330 | mmb.InitMiniModule(world, host, itemID); | 302 | mmb.InitMiniModule(world, host, itemID); |
331 | } | 303 | } |
332 | 304 | ||
305 | public void PostInitialise() | ||
306 | { | ||
307 | |||
308 | } | ||
309 | |||
333 | public void Close() | 310 | public void Close() |
334 | { | 311 | { |
335 | foreach (KeyValuePair<UUID, MRMBase> pair in m_scripts) | 312 | foreach (KeyValuePair<UUID, MRMBase> pair in m_scripts) |
@@ -343,6 +320,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
343 | get { return "MiniRegionModule"; } | 320 | get { return "MiniRegionModule"; } |
344 | } | 321 | } |
345 | 322 | ||
323 | public bool IsSharedModule | ||
324 | { | ||
325 | get { return false; } | ||
326 | } | ||
327 | |||
346 | /// <summary> | 328 | /// <summary> |
347 | /// Stolen from ScriptEngine Common | 329 | /// Stolen from ScriptEngine Common |
348 | /// </summary> | 330 | /// </summary> |
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index 999756a..c653e98 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | |||
@@ -100,10 +100,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | |||
100 | if (!m_enabled) | 100 | if (!m_enabled) |
101 | return; | 101 | return; |
102 | 102 | ||
103 | scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; | 103 | m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; |
104 | scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded; | 104 | m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded; |
105 | 105 | ||
106 | scene = null; | 106 | m_scene = null; |
107 | } | 107 | } |
108 | 108 | ||
109 | public void Close() | 109 | public void Close() |
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index df01938..44c9ada 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -58,7 +58,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms | |||
58 | 58 | ||
59 | public void RemoveRegion(Scene scene) | 59 | public void RemoveRegion(Scene scene) |
60 | { | 60 | { |
61 | scene.UnregisterModuleInterface<IScriptModuleComms>(this); | ||
62 | } | 61 | } |
63 | 62 | ||
64 | public void RegionLoaded(Scene scene) | 63 | public void RegionLoaded(Scene scene) |
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index f2a0e53..d18ac0a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs | |||
@@ -30,7 +30,6 @@ using System.Collections.Generic; | |||
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | 31 | ||
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Addins; | ||
34 | using Nini.Config; | 33 | using Nini.Config; |
35 | using OpenMetaverse; | 34 | using OpenMetaverse; |
36 | 35 | ||
@@ -50,8 +49,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
50 | public string uri; | 49 | public string uri; |
51 | } | 50 | } |
52 | 51 | ||
53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 52 | public class XmlRpcGridRouter : IRegionModule, IXmlRpcRouter |
54 | public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter | ||
55 | { | 53 | { |
56 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
57 | 55 | ||
@@ -61,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
61 | private bool m_Enabled = false; | 59 | private bool m_Enabled = false; |
62 | private string m_ServerURI = String.Empty; | 60 | private string m_ServerURI = String.Empty; |
63 | 61 | ||
64 | public void Initialise(IConfigSource config) | 62 | public void Initialise(Scene scene, IConfigSource config) |
65 | { | 63 | { |
66 | IConfig startupConfig = config.Configs["Startup"]; | 64 | IConfig startupConfig = config.Configs["Startup"]; |
67 | if (startupConfig == null) | 65 | if (startupConfig == null) |
@@ -77,26 +75,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
77 | return; | 75 | return; |
78 | } | 76 | } |
79 | 77 | ||
78 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); | ||
80 | m_Enabled = true; | 79 | m_Enabled = true; |
81 | } | 80 | } |
82 | } | 81 | } |
83 | 82 | ||
84 | public void AddRegion(Scene scene) | 83 | public void PostInitialise() |
85 | { | 84 | { |
86 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); | ||
87 | } | ||
88 | public void RegionLoaded(Scene scene) | ||
89 | { | ||
90 | } | ||
91 | |||
92 | public void RemoveRegion(Scene scene) | ||
93 | { | ||
94 | scene.UnregisterModuleInterface<IXmlRpcRouter>(this); | ||
95 | } | ||
96 | |||
97 | public Type ReplaceableInterface | ||
98 | { | ||
99 | get { return null; } | ||
100 | } | 85 | } |
101 | 86 | ||
102 | public void Close() | 87 | public void Close() |
@@ -108,6 +93,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
108 | get { return "XmlRpcGridRouterModule"; } | 93 | get { return "XmlRpcGridRouterModule"; } |
109 | } | 94 | } |
110 | 95 | ||
96 | public bool IsSharedModule | ||
97 | { | ||
98 | get { return false; } | ||
99 | } | ||
100 | |||
111 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) | 101 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) |
112 | { | 102 | { |
113 | if (!m_Channels.ContainsKey(itemID)) | 103 | if (!m_Channels.ContainsKey(itemID)) |
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs index 4d39345..32659c8 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs | |||
@@ -29,7 +29,6 @@ using System; | |||
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | 30 | ||
31 | using log4net; | 31 | using log4net; |
32 | using Mono.Addins; | ||
33 | using Nini.Config; | 32 | using Nini.Config; |
34 | using OpenMetaverse; | 33 | using OpenMetaverse; |
35 | 34 | ||
@@ -40,12 +39,11 @@ using OpenSim.Region.Framework.Scenes; | |||
40 | 39 | ||
41 | namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | 40 | namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule |
42 | { | 41 | { |
43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 42 | public class XmlRpcRouter : IRegionModule, IXmlRpcRouter |
44 | public class XmlRpcRouter : INonSharedRegionModule, IXmlRpcRouter | ||
45 | { | 43 | { |
46 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | private bool m_enabled = false; | 45 | |
48 | public void Initialise(IConfigSource config) | 46 | public void Initialise(Scene scene, IConfigSource config) |
49 | { | 47 | { |
50 | IConfig startupConfig = config.Configs["Startup"]; | 48 | IConfig startupConfig = config.Configs["Startup"]; |
51 | if (startupConfig == null) | 49 | if (startupConfig == null) |
@@ -54,25 +52,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | |||
54 | if (startupConfig.GetString("XmlRpcRouterModule", | 52 | if (startupConfig.GetString("XmlRpcRouterModule", |
55 | "XmlRpcRouterModule") == "XmlRpcRouterModule") | 53 | "XmlRpcRouterModule") == "XmlRpcRouterModule") |
56 | { | 54 | { |
57 | m_enabled = true; | 55 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); |
58 | } | 56 | } |
59 | } | 57 | } |
60 | public void AddRegion(Scene scene) | ||
61 | { | ||
62 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); | ||
63 | } | ||
64 | public void RegionLoaded(Scene scene) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | public void RemoveRegion(Scene scene) | ||
69 | { | ||
70 | scene.UnregisterModuleInterface<IXmlRpcRouter>(this); | ||
71 | } | ||
72 | 58 | ||
73 | public Type ReplaceableInterface | 59 | public void PostInitialise() |
74 | { | 60 | { |
75 | get { return null; } | ||
76 | } | 61 | } |
77 | 62 | ||
78 | public void Close() | 63 | public void Close() |
@@ -84,6 +69,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | |||
84 | get { return "XmlRpcRouterModule"; } | 69 | get { return "XmlRpcRouterModule"; } |
85 | } | 70 | } |
86 | 71 | ||
72 | public bool IsSharedModule | ||
73 | { | ||
74 | get { return false; } | ||
75 | } | ||
76 | |||
87 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) | 77 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) |
88 | { | 78 | { |
89 | scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri}); | 79 | scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri}); |
diff --git a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs index 801f1f8..97fa63c 100644 --- a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch | |||
47 | private IConfigSource m_Config; | 47 | private IConfigSource m_Config; |
48 | bool m_Registered = false; | 48 | bool m_Registered = false; |
49 | 49 | ||
50 | #region ISharedRegionModule interface | 50 | #region IRegionModule interface |
51 | 51 | ||
52 | public void Initialise(IConfigSource config) | 52 | public void Initialise(IConfigSource config) |
53 | { | 53 | { |
diff --git a/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs index fa5878d..3490a8b 100644 --- a/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/OptionalModules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -31,7 +31,6 @@ using System.IO; | |||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Timers; | 32 | using System.Timers; |
33 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
35 | using Nini.Config; | 34 | using Nini.Config; |
36 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.CoreModules.World.Serialiser; | 36 | using OpenSim.Region.CoreModules.World.Serialiser; |
@@ -43,8 +42,7 @@ using Slash = System.IO.Path; | |||
43 | 42 | ||
44 | namespace OpenSim.Region.Modules.SvnSerialiser | 43 | namespace OpenSim.Region.Modules.SvnSerialiser |
45 | { | 44 | { |
46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 45 | public class SvnBackupModule : IRegionModule |
47 | public class SvnBackupModule : ISharedRegionModule | ||
48 | { | 46 | { |
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 48 | ||
@@ -202,9 +200,9 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
202 | 200 | ||
203 | #endregion | 201 | #endregion |
204 | 202 | ||
205 | #region ISharedRegionModule Members | 203 | #region IRegionModule Members |
206 | 204 | ||
207 | public void Initialise(IConfigSource source) | 205 | public void Initialise(Scene scene, IConfigSource source) |
208 | { | 206 | { |
209 | m_scenes = new List<Scene>(); | 207 | m_scenes = new List<Scene>(); |
210 | m_timer = new Timer(); | 208 | m_timer = new Timer(); |
@@ -227,10 +225,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
227 | catch (Exception) | 225 | catch (Exception) |
228 | { | 226 | { |
229 | } | 227 | } |
230 | } | ||
231 | 228 | ||
232 | public void AddRegion(Scene scene) | ||
233 | { | ||
234 | lock (m_scenes) | 229 | lock (m_scenes) |
235 | { | 230 | { |
236 | m_scenes.Add(scene); | 231 | m_scenes.Add(scene); |
@@ -241,18 +236,6 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
241 | scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | 236 | scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; |
242 | } | 237 | } |
243 | } | 238 | } |
244 | public void RegionLoaded(Scene scene) | ||
245 | { | ||
246 | } | ||
247 | |||
248 | public void RemoveRegion(Scene scene) | ||
249 | { | ||
250 | } | ||
251 | |||
252 | public Type ReplaceableInterface | ||
253 | { | ||
254 | get { return null; } | ||
255 | } | ||
256 | 239 | ||
257 | public void PostInitialise() | 240 | public void PostInitialise() |
258 | { | 241 | { |
@@ -294,6 +277,11 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
294 | get { return "SvnBackupModule"; } | 277 | get { return "SvnBackupModule"; } |
295 | } | 278 | } |
296 | 279 | ||
280 | public bool IsSharedModule | ||
281 | { | ||
282 | get { return true; } | ||
283 | } | ||
284 | |||
297 | #endregion | 285 | #endregion |
298 | 286 | ||
299 | private void EventManager_OnPluginConsole(string[] args) | 287 | private void EventManager_OnPluginConsole(string[] args) |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 521d01a..ac39a53 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -25,11 +25,9 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
30 | using System.Threading; | 29 | using System.Threading; |
31 | using OpenMetaverse; | 30 | using OpenMetaverse; |
32 | using Mono.Addins; | ||
33 | using Nini.Config; | 31 | using Nini.Config; |
34 | using OpenSim.Region.Framework.Interfaces; | 32 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
@@ -39,8 +37,7 @@ using Timer=System.Timers.Timer; | |||
39 | 37 | ||
40 | namespace OpenSim.Region.OptionalModules.World.NPC | 38 | namespace OpenSim.Region.OptionalModules.World.NPC |
41 | { | 39 | { |
42 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 40 | public class NPCModule : IRegionModule, INPCModule |
43 | public class NPCModule : ISharedRegionModule, INPCModule | ||
44 | { | 41 | { |
45 | // private const bool m_enabled = false; | 42 | // private const bool m_enabled = false; |
46 | 43 | ||
@@ -137,13 +134,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
137 | } | 134 | } |
138 | 135 | ||
139 | 136 | ||
140 | public void Initialise(IConfigSource source) | 137 | public void Initialise(Scene scene, IConfigSource source) |
141 | { | 138 | { |
142 | m_createMutex = new Mutex(false); | 139 | m_createMutex = new Mutex(false); |
143 | 140 | ||
144 | m_timer = new Timer(500); | 141 | m_timer = new Timer(500); |
145 | m_timer.Elapsed += m_timer_Elapsed; | 142 | m_timer.Elapsed += m_timer_Elapsed; |
146 | m_timer.Start(); | 143 | m_timer.Start(); |
144 | |||
145 | scene.RegisterModuleInterface<INPCModule>(this); | ||
147 | } | 146 | } |
148 | 147 | ||
149 | void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) | 148 | void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) |
@@ -174,19 +173,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
174 | } | 173 | } |
175 | } | 174 | } |
176 | 175 | ||
177 | public void AddRegion(Scene scene) | ||
178 | { | ||
179 | scene.RegisterModuleInterface<INPCModule>(this); | ||
180 | } | ||
181 | public void RegionLoaded(Scene scene) | ||
182 | { | ||
183 | } | ||
184 | |||
185 | public void RemoveRegion(Scene scene) | ||
186 | { | ||
187 | scene.UnregisterModuleInterface<INPCModule>(this); | ||
188 | } | ||
189 | |||
190 | public void PostInitialise() | 176 | public void PostInitialise() |
191 | { | 177 | { |
192 | } | 178 | } |
@@ -200,9 +186,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
200 | get { return "NPCModule"; } | 186 | get { return "NPCModule"; } |
201 | } | 187 | } |
202 | 188 | ||
203 | public Type ReplaceableInterface | 189 | public bool IsSharedModule |
204 | { | 190 | { |
205 | get { return null; } | 191 | get { return true; } |
206 | } | 192 | } |
207 | } | 193 | } |
208 | } | 194 | } |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index b59d07a..e3fbb6e 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -31,7 +31,6 @@ using System.Reflection; | |||
31 | using System.Timers; | 31 | using System.Timers; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
35 | using Nini.Config; | 34 | using Nini.Config; |
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; | 36 | using OpenSim.Region.CoreModules.Framework.InterfaceCommander; |
@@ -47,8 +46,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
47 | /// <summary> | 46 | /// <summary> |
48 | /// Version 2.02 - Still hacky | 47 | /// Version 2.02 - Still hacky |
49 | /// </summary> | 48 | /// </summary> |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 49 | public class TreePopulatorModule : IRegionModule, ICommandableModule, IVegetationModule |
51 | public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule | ||
52 | { | 50 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | private readonly Commander m_commander = new Commander("tree"); | 52 | private readonly Commander m_commander = new Commander("tree"); |
@@ -170,10 +168,15 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
170 | 168 | ||
171 | #endregion | 169 | #endregion |
172 | 170 | ||
173 | #region ISharedRegionModule Members | 171 | #region IRegionModule Members |
174 | 172 | ||
175 | public void Initialise(IConfigSource config) | 173 | public void Initialise(Scene scene, IConfigSource config) |
176 | { | 174 | { |
175 | |||
176 | m_scene = scene; | ||
177 | m_scene.RegisterModuleInterface<IRegionModule>(this); | ||
178 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | ||
179 | |||
177 | // ini file settings | 180 | // ini file settings |
178 | try | 181 | try |
179 | { | 182 | { |
@@ -193,18 +196,12 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
193 | m_log.Debug("[TREES]: ini failure for update_rate - using default"); | 196 | m_log.Debug("[TREES]: ini failure for update_rate - using default"); |
194 | } | 197 | } |
195 | 198 | ||
196 | m_log.Debug("[TREES]: Initialised tree module"); | ||
197 | } | ||
198 | |||
199 | public void AddRegion(Scene scene) | ||
200 | { | ||
201 | m_scene = scene; | ||
202 | m_scene.RegisterModuleInterface<INonSharedRegionModule>(this); | ||
203 | m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | ||
204 | InstallCommands(); | 199 | InstallCommands(); |
200 | |||
201 | m_log.Debug("[TREES]: Initialised tree module"); | ||
205 | } | 202 | } |
206 | 203 | ||
207 | public void RegionLoaded(Scene scene) | 204 | public void PostInitialise() |
208 | { | 205 | { |
209 | ReloadCopse(); | 206 | ReloadCopse(); |
210 | if (m_copse.Count > 0) | 207 | if (m_copse.Count > 0) |
@@ -214,17 +211,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
214 | activeizeTreeze(true); | 211 | activeizeTreeze(true); |
215 | } | 212 | } |
216 | 213 | ||
217 | public void RemoveRegion(Scene scene) | ||
218 | { | ||
219 | scene.UnregisterModuleInterface<INonSharedRegionModule>(this); | ||
220 | scene.EventManager.OnPluginConsole -= EventManager_OnPluginConsole; | ||
221 | } | ||
222 | |||
223 | public Type ReplaceableInterface | ||
224 | { | ||
225 | get { return null; } | ||
226 | } | ||
227 | |||
228 | public void Close() | 214 | public void Close() |
229 | { | 215 | { |
230 | } | 216 | } |
@@ -234,6 +220,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
234 | get { return "TreePopulatorModule"; } | 220 | get { return "TreePopulatorModule"; } |
235 | } | 221 | } |
236 | 222 | ||
223 | public bool IsSharedModule | ||
224 | { | ||
225 | get { return false; } | ||
226 | } | ||
227 | |||
237 | #endregion | 228 | #endregion |
238 | 229 | ||
239 | //-------------------------------------------------------------- | 230 | //-------------------------------------------------------------- |