aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorCharles Krinke2008-07-04 03:11:53 +0000
committerCharles Krinke2008-07-04 03:11:53 +0000
commit23ec21e44a2d7227ca56c31622e9b9b754e52879 (patch)
tree43c85dc02b176f03539ed8617e05d566a4d5db1d /OpenSim/Region
parentMantis#1659. Thank you, Melanie for a patch that: (diff)
downloadopensim-SC_OLD-23ec21e44a2d7227ca56c31622e9b9b754e52879.zip
opensim-SC_OLD-23ec21e44a2d7227ca56c31622e9b9b754e52879.tar.gz
opensim-SC_OLD-23ec21e44a2d7227ca56c31622e9b9b754e52879.tar.bz2
opensim-SC_OLD-23ec21e44a2d7227ca56c31622e9b9b754e52879.tar.xz
Mantis#1647. Thank you very much, Sempuki for a patch that:
Updates the previous module loader work.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/IApplicationPlugin.cs11
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs13
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