From 8c130bcaf5a60fa042d8df38ba1d1e1cb328d768 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 12 Nov 2012 22:50:28 +0000 Subject: Remove the old style module loader and all references to it --- OpenSim/Region/Application/OpenSim.cs | 47 +++---------------------------- OpenSim/Region/Application/OpenSimBase.cs | 26 +---------------- 2 files changed, 5 insertions(+), 68 deletions(-) (limited to 'OpenSim/Region/Application') 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 switch (cmdparams[0].ToLower()) { case "list": - foreach (IRegionModule irm in m_moduleLoader.GetLoadedSharedModules) - { - MainConsole.Instance.Output(String.Format("Shared region module: {0}", irm.Name)); - } + //TODO: Convert to new region modules break; case "unload": - if (cmdparams.Length > 1) - { - foreach (IRegionModule rm in new ArrayList(m_moduleLoader.GetLoadedSharedModules)) - { - if (rm.Name.ToLower() == cmdparams[1].ToLower()) - { - MainConsole.Instance.Output(String.Format("Unloading module: {0}", rm.Name)); - m_moduleLoader.UnloadModule(rm); - } - } - } + //TODO: Convert to new region modules break; case "load": - if (cmdparams.Length > 1) - { - foreach (Scene s in new ArrayList(SceneManager.Scenes)) - { - MainConsole.Instance.Output(String.Format("Loading module: {0}", cmdparams[1])); - m_moduleLoader.LoadRegionModules(cmdparams[1], s); - } - } + //TODO: Convert to new region modules break; } } @@ -1018,28 +998,9 @@ namespace OpenSim break; case "modules": - MainConsole.Instance.Output("The currently loaded shared modules are:"); - foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) - { - MainConsole.Instance.Output("Shared Module: " + module.Name); - } - - SceneManager.ForEachScene( - delegate(Scene scene) { - m_log.Error("The currently loaded modules in " + scene.RegionInfo.RegionName + " are:"); - foreach (IRegionModule module in scene.Modules.Values) - { - if (!module.IsSharedModule) - { - m_log.Error("Region Module: " + module.Name); - } - } - } - ); - SceneManager.ForEachScene( delegate(Scene scene) { - MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:"); + MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:"); foreach (IRegionModuleBase module in scene.RegionModules.Values) { 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 get { return m_httpServerPort; } } - public ModuleLoader ModuleLoader - { - get { return m_moduleLoader; } - set { m_moduleLoader = value; } - } - - protected ModuleLoader m_moduleLoader; - protected IRegistryCore m_applicationRegistry = new RegistryCore(); public IRegistryCore ApplicationRegistry @@ -223,9 +215,6 @@ namespace OpenSim base.StartupSpecific(); - // Create a ModuleLoader instance - m_moduleLoader = new ModuleLoader(m_config.Source); - LoadPlugins(); foreach (IApplicationPlugin plugin in m_plugins) { @@ -370,12 +359,6 @@ namespace OpenSim m_log.Info("[MODULES]: Loading Region's modules (old style)"); - List modules = m_moduleLoader.PickupModules(scene, "."); - - // This needs to be ahead of the script engine load, so the - // script module can pick up events exposed by a module - m_moduleLoader.InitialiseSharedModules(scene); - // Use this in the future, the line above will be deprecated soon m_log.Info("[REGIONMODULES]: Loading Region's modules (new style)"); IRegionModulesController controller; @@ -426,13 +409,6 @@ namespace OpenSim clientServer.Start(); } - if (do_post_init) - { - foreach (IRegionModule module in modules) - { - module.PostInitialise(); - } - } scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; mscene = scene; @@ -722,7 +698,7 @@ namespace OpenSim return new Scene( regionInfo, circuitManager, sceneGridService, - simDataService, estateDataService, m_moduleLoader, false, + simDataService, estateDataService, false, m_config.Source, m_version); } -- cgit v1.1