diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 47 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 71 |
2 files changed, 28 insertions, 90 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 5f07272..4c4abb6 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -757,33 +757,13 @@ namespace OpenSim | |||
757 | switch (cmdparams[0].ToLower()) | 757 | switch (cmdparams[0].ToLower()) |
758 | { | 758 | { |
759 | case "list": | 759 | case "list": |
760 | foreach (IRegionModule irm in m_moduleLoader.GetLoadedSharedModules) | 760 | //TODO: Convert to new region modules |
761 | { | ||
762 | MainConsole.Instance.Output(String.Format("Shared region module: {0}", irm.Name)); | ||
763 | } | ||
764 | break; | 761 | break; |
765 | case "unload": | 762 | case "unload": |
766 | if (cmdparams.Length > 1) | 763 | //TODO: Convert to new region modules |
767 | { | ||
768 | foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules)) | ||
769 | { | ||
770 | if (rm.Name.ToLower() == cmdparams[1].ToLower()) | ||
771 | { | ||
772 | MainConsole.Instance.Output(String.Format("Unloading module: {0}", rm.Name)); | ||
773 | m_moduleLoader.UnloadModule(rm); | ||
774 | } | ||
775 | } | ||
776 | } | ||
777 | break; | 764 | break; |
778 | case "load": | 765 | case "load": |
779 | if (cmdparams.Length > 1) | 766 | //TODO: Convert to new region modules |
780 | { | ||
781 | foreach (Scene s in new ArrayList(SceneManager.Scenes)) | ||
782 | { | ||
783 | MainConsole.Instance.Output(String.Format("Loading module: {0}", cmdparams[1])); | ||
784 | m_moduleLoader.LoadRegionModules(cmdparams[1], s); | ||
785 | } | ||
786 | } | ||
787 | break; | 767 | break; |
788 | } | 768 | } |
789 | } | 769 | } |
@@ -1018,28 +998,9 @@ namespace OpenSim | |||
1018 | break; | 998 | break; |
1019 | 999 | ||
1020 | case "modules": | 1000 | case "modules": |
1021 | MainConsole.Instance.Output("The currently loaded shared modules are:"); | ||
1022 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) | ||
1023 | { | ||
1024 | MainConsole.Instance.Output("Shared Module: " + module.Name); | ||
1025 | } | ||
1026 | |||
1027 | SceneManager.ForEachScene( | ||
1028 | delegate(Scene scene) { | ||
1029 | m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); | ||
1030 | foreach (IRegionModule module in scene.Modules.Values) | ||
1031 | { | ||
1032 | if (!module.IsSharedModule) | ||
1033 | { | ||
1034 | m_log.Error("Region Module: " + module.Name); | ||
1035 | } | ||
1036 | } | ||
1037 | } | ||
1038 | ); | ||
1039 | |||
1040 | SceneManager.ForEachScene( | 1001 | SceneManager.ForEachScene( |
1041 | delegate(Scene scene) { | 1002 | delegate(Scene scene) { |
1042 | MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:"); | 1003 | MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:"); |
1043 | foreach (IRegionModuleBase module in scene.RegionModules.Values) | 1004 | foreach (IRegionModuleBase module in scene.RegionModules.Values) |
1044 | { | 1005 | { |
1045 | Type type = module.GetType().GetInterface("ISharedRegionModule"); | 1006 | Type type = module.GetType().GetInterface("ISharedRegionModule"); |
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 | ||