diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/IApplicationPlugin.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 13 |
2 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Region/Application/IApplicationPlugin.cs b/OpenSim/Region/Application/IApplicationPlugin.cs index e1187ae..f122925 100644 --- a/OpenSim/Region/Application/IApplicationPlugin.cs +++ b/OpenSim/Region/Application/IApplicationPlugin.cs | |||
@@ -37,4 +37,15 @@ namespace OpenSim | |||
37 | { | 37 | { |
38 | void Initialise(OpenSimBase openSim); | 38 | void Initialise(OpenSimBase openSim); |
39 | } | 39 | } |
40 | |||
41 | public class ApplicationPluginInitialiser : PluginInitialiserBase | ||
42 | { | ||
43 | private OpenSimBase server; | ||
44 | public ApplicationPluginInitialiser (OpenSimBase s) { server = s; } | ||
45 | public override void Initialise (IPlugin plugin) | ||
46 | { | ||
47 | IApplicationPlugin p = plugin as IApplicationPlugin; | ||
48 | p.Initialise (server); | ||
49 | } | ||
50 | } | ||
40 | } | 51 | } |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 55d19c1..2c2ec09 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -332,16 +332,12 @@ namespace OpenSim | |||
332 | m_networkServersInfo.loadFromConfiguration(m_config.Source); | 332 | m_networkServersInfo.loadFromConfiguration(m_config.Source); |
333 | } | 333 | } |
334 | 334 | ||
335 | protected void plugin_initialiser_ (IPlugin plugin) | ||
336 | { | ||
337 | IApplicationPlugin p = plugin as IApplicationPlugin; | ||
338 | p.Initialise (this); | ||
339 | } | ||
340 | |||
341 | protected void LoadPlugins() | 335 | protected void LoadPlugins() |
342 | { | 336 | { |
343 | PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin> ("."); | 337 | PluginLoader<IApplicationPlugin> loader = |
344 | loader.Load ("/OpenSim/Startup", plugin_initialiser_); | 338 | new PluginLoader<IApplicationPlugin> (new ApplicationPluginInitialiser (this)); |
339 | |||
340 | loader.Load ("/OpenSim/Startup", "."); | ||
345 | m_plugins = loader.Plugins; | 341 | m_plugins = loader.Plugins; |
346 | } | 342 | } |
347 | 343 | ||
@@ -733,3 +729,4 @@ namespace OpenSim | |||
733 | 729 | ||
734 | 730 | ||
735 | 731 | ||
732 | |||