mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Remove the old style module loader and all references to it
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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<IRegionModule> 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user