aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMelanie2012-11-12 22:50:28 +0000
committerMelanie2012-11-12 22:50:28 +0000
commit8c130bcaf5a60fa042d8df38ba1d1e1cb328d768 (patch)
treec96ae7dcf06cf6f6b4efba25bb0a37e55c053fce /OpenSim/Region/Application
parentRemove IRegionModule support from the test setup helper (diff)
downloadopensim-SC-8c130bcaf5a60fa042d8df38ba1d1e1cb328d768.zip
opensim-SC-8c130bcaf5a60fa042d8df38ba1d1e1cb328d768.tar.gz
opensim-SC-8c130bcaf5a60fa042d8df38ba1d1e1cb328d768.tar.bz2
opensim-SC-8c130bcaf5a60fa042d8df38ba1d1e1cb328d768.tar.xz
Remove the old style module loader and all references to it
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs47
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs26
2 files changed, 5 insertions, 68 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 2236e43..47252f6 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 7b591a8..a3d6820 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -127,14 +127,6 @@ namespace OpenSim
127 get { return m_httpServerPort; } 127 get { return m_httpServerPort; }
128 } 128 }
129 129
130 public ModuleLoader ModuleLoader
131 {
132 get { return m_moduleLoader; }
133 set { m_moduleLoader = value; }
134 }
135
136 protected ModuleLoader m_moduleLoader;
137
138 protected IRegistryCore m_applicationRegistry = new RegistryCore(); 130 protected IRegistryCore m_applicationRegistry = new RegistryCore();
139 131
140 public IRegistryCore ApplicationRegistry 132 public IRegistryCore ApplicationRegistry
@@ -223,9 +215,6 @@ namespace OpenSim
223 215
224 base.StartupSpecific(); 216 base.StartupSpecific();
225 217
226 // Create a ModuleLoader instance
227 m_moduleLoader = new ModuleLoader(m_config.Source);
228
229 LoadPlugins(); 218 LoadPlugins();
230 foreach (IApplicationPlugin plugin in m_plugins) 219 foreach (IApplicationPlugin plugin in m_plugins)
231 { 220 {
@@ -370,12 +359,6 @@ namespace OpenSim
370 359
371 m_log.Info("[MODULES]: Loading Region's modules (old style)"); 360 m_log.Info("[MODULES]: Loading Region's modules (old style)");
372 361
373 List<IRegionModule> modules = m_moduleLoader.PickupModules(scene, ".");
374
375 // This needs to be ahead of the script engine load, so the
376 // script module can pick up events exposed by a module
377 m_moduleLoader.InitialiseSharedModules(scene);
378
379 // Use this in the future, the line above will be deprecated soon 362 // Use this in the future, the line above will be deprecated soon
380 m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)"); 363 m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)");
381 IRegionModulesController controller; 364 IRegionModulesController controller;
@@ -426,13 +409,6 @@ namespace OpenSim
426 clientServer.Start(); 409 clientServer.Start();
427 } 410 }
428 411
429 if (do_post_init)
430 {
431 foreach (IRegionModule module in modules)
432 {
433 module.PostInitialise();
434 }
435 }
436 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; 412 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); };
437 413
438 mscene = scene; 414 mscene = scene;
@@ -722,7 +698,7 @@ namespace OpenSim
722 698
723 return new Scene( 699 return new Scene(
724 regionInfo, circuitManager, sceneGridService, 700 regionInfo, circuitManager, sceneGridService,
725 simDataService, estateDataService, m_moduleLoader, false, 701 simDataService, estateDataService, false,
726 m_config.Source, m_version); 702 m_config.Source, m_version);
727 } 703 }
728 704