aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs71
1 files changed, 24 insertions, 47 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 7232383..1c28219 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -131,14 +131,6 @@ namespace OpenSim
131 get { return m_httpServerPort; } 131 get { return m_httpServerPort; }
132 } 132 }
133 133
134 public ModuleLoader ModuleLoader
135 {
136 get { return m_moduleLoader; }
137 set { m_moduleLoader = value; }
138 }
139
140 protected ModuleLoader m_moduleLoader;
141
142 protected IRegistryCore m_applicationRegistry = new RegistryCore(); 134 protected IRegistryCore m_applicationRegistry = new RegistryCore();
143 135
144 public IRegistryCore ApplicationRegistry 136 public IRegistryCore ApplicationRegistry
@@ -232,9 +224,6 @@ namespace OpenSim
232 224
233 base.StartupSpecific(); 225 base.StartupSpecific();
234 226
235 // Create a ModuleLoader instance
236 m_moduleLoader = new ModuleLoader(m_config.Source);
237
238 LoadPlugins(); 227 LoadPlugins();
239 228
240 if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! 229 if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch!
@@ -385,12 +374,6 @@ namespace OpenSim
385 374
386 m_log.Info("[MODULES]: Loading Region's modules (old style)"); 375 m_log.Info("[MODULES]: Loading Region's modules (old style)");
387 376
388 List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, ".");
389
390 // This needs to be ahead of the script engine load, so the
391 // script module can pick up events exposed by a module
392 m_moduleLoader.InitialiseSharedModules(scene);
393
394 // Use this in the future, the line above will be deprecated soon 377 // Use this in the future, the line above will be deprecated soon
395 m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)"); 378 m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)");
396 IRegionModulesController controller; 379 IRegionModulesController controller;
@@ -400,28 +383,29 @@ namespace OpenSim
400 } 383 }
401 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); 384 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
402 385
403 if (m_securePermissionsLoading) 386 // XPTO: Fix this
404 { 387// if (m_securePermissionsLoading)
405 foreach (string s in m_permsModules) 388// {
406 { 389// foreach (string s in m_permsModules)
407 if (!scene.RegionModules.ContainsKey(s)) 390// {
408 { 391// if (!scene.RegionModules.ContainsKey(s))
409 bool found = false; 392// {
410 foreach (IRegionModule m in modules) 393// bool found = false;
411 { 394// foreach (IRegionModule m in modules)
412 if (m.Name == s) 395// {
413 { 396// if (m.Name == s)
414 found = true; 397// {
415 } 398// found = true;
416 } 399// }
417 if (!found) 400// }
418 { 401// if (!found)
419 m_log.Fatal("[MODULES]: Required module " + s + " not found."); 402// {
420 Environment.Exit(0); 403// m_log.Fatal("[MODULES]: Required module " + s + " not found.");
421 } 404// Environment.Exit(0);
422 } 405// }
423 } 406// }
424 } 407// }
408// }
425 409
426 scene.SetModuleInterfaces(); 410 scene.SetModuleInterfaces();
427// First Step of bootreport sequence 411// First Step of bootreport sequence
@@ -498,13 +482,6 @@ namespace OpenSim
498 { 482 {
499 scene.SnmpService.BootInfo("Initializing region modules", scene); 483 scene.SnmpService.BootInfo("Initializing region modules", scene);
500 } 484 }
501 if (do_post_init)
502 {
503 foreach (IRegionModule module in modules)
504 {
505 module.PostInitialise();
506 }
507 }
508 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; 485 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); };
509 486
510 mscene = scene; 487 mscene = scene;
@@ -805,7 +782,7 @@ namespace OpenSim
805 782
806 return new Scene( 783 return new Scene(
807 regionInfo, circuitManager, sceneGridService, 784 regionInfo, circuitManager, sceneGridService,
808 simDataService, estateDataService, m_moduleLoader, false, 785 simDataService, estateDataService, false,
809 m_config.Source, m_version); 786 m_config.Source, m_version);
810 } 787 }
811 788