Removed some ScriptEngine config debugging.

Added experimental console command to:
* unload module (note: module probably doesn't support it)
* load module
Not visible in help (needs testing first).
ThreadPoolClientBranch
Tedd Hansen 2008-02-10 19:03:38 +00:00
parent b4a19a4fb4
commit 0756e01475
3 changed files with 36 additions and 0 deletions

View File

@ -961,6 +961,30 @@ namespace OpenSim
m_console.Notice("Shared region module: " + irm.Name); m_console.Notice("Shared region module: " + irm.Name);
} }
break; break;
case "unload":
if (cmdparams.Length > 1)
{
foreach (IRegionModule rm in new System.Collections.ArrayList(m_moduleLoader.GetLoadedSharedModules))
{
if (rm.Name.ToLower() == cmdparams[1].ToLower())
{
m_console.Notice("Unloading module: " + rm.Name);
m_moduleLoader.UnloadModule(rm);
}
}
}
break;
case "load":
if (cmdparams.Length > 1)
{
foreach (Scene s in new System.Collections.ArrayList(m_sceneManager.Scenes))
{
m_console.Notice("Loading module: " + cmdparams[1]);
m_moduleLoader.LoadRegionModules(cmdparams[1], s);
}
}
break;
} }
} }

View File

@ -294,5 +294,12 @@ namespace OpenSim.Region.Environment
{ {
LoadedAssemblys.Clear(); LoadedAssemblys.Clear();
} }
public void UnloadModule(IRegionModule rm)
{
rm.Close();
m_loadedModules.Remove(rm);
}
} }
} }

View File

@ -45,6 +45,11 @@ namespace OpenSim.Region.Environment.Scenes
private readonly List<Scene> m_localScenes; private readonly List<Scene> m_localScenes;
private Scene m_currentScene = null; private Scene m_currentScene = null;
public List<Scene> Scenes
{
get { return m_localScenes; }
}
public Scene CurrentScene public Scene CurrentScene
{ {
get { return m_currentScene; } get { return m_currentScene; }