Get "show modules" console command to obey selected command line region/s
parent
4d9307753a
commit
f80ce30f4b
|
@ -827,26 +827,7 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "modules":
|
case "modules":
|
||||||
MainConsole.Instance.Output("The currently loaded shared modules are:");
|
SceneManager.ForEachSelectedScene(
|
||||||
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(
|
|
||||||
scene =>
|
scene =>
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
|
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
|
||||||
|
|
|
@ -345,35 +345,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SendCommandToPluginModules(string[] cmdparams)
|
public void SendCommandToPluginModules(string[] cmdparams)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
|
public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ForEachCurrentScene(Action<Scene> func)
|
public void ForEachSelectedScene(Action<Scene> func)
|
||||||
{
|
{
|
||||||
if (CurrentScene == null)
|
if (CurrentScene == null)
|
||||||
{
|
ForEachScene(func);
|
||||||
lock (m_localScenes)
|
|
||||||
m_localScenes.ForEach(func);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
func(CurrentScene);
|
func(CurrentScene);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RestartCurrentScene()
|
public void RestartCurrentScene()
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.RestartNow(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BackupCurrentScene()
|
public void BackupCurrentScene()
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.Backup(true); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.Backup(true); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TrySetCurrentScene(string regionName)
|
public bool TrySetCurrentScene(string regionName)
|
||||||
|
@ -504,7 +499,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="name">Name of avatar to debug</param>
|
/// <param name="name">Name of avatar to debug</param>
|
||||||
public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
|
public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(scene =>
|
ForEachSelectedScene(scene =>
|
||||||
scene.ForEachScenePresence(sp =>
|
scene.ForEachScenePresence(sp =>
|
||||||
{
|
{
|
||||||
if (name == null || sp.Name == name)
|
if (name == null || sp.Name == name)
|
||||||
|
@ -523,7 +518,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
List<ScenePresence> avatars = new List<ScenePresence>();
|
List<ScenePresence> avatars = new List<ScenePresence>();
|
||||||
|
|
||||||
ForEachCurrentScene(
|
ForEachSelectedScene(
|
||||||
delegate(Scene scene)
|
delegate(Scene scene)
|
||||||
{
|
{
|
||||||
scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||||
|
@ -540,7 +535,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
List<ScenePresence> presences = new List<ScenePresence>();
|
List<ScenePresence> presences = new List<ScenePresence>();
|
||||||
|
|
||||||
ForEachCurrentScene(delegate(Scene scene)
|
ForEachSelectedScene(delegate(Scene scene)
|
||||||
{
|
{
|
||||||
scene.ForEachScenePresence(delegate(ScenePresence sp)
|
scene.ForEachScenePresence(delegate(ScenePresence sp)
|
||||||
{
|
{
|
||||||
|
@ -569,12 +564,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void ForceCurrentSceneClientUpdate()
|
public void ForceCurrentSceneClientUpdate()
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.ForceClientUpdate(); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.ForceClientUpdate(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleEditCommandOnCurrentScene(string[] cmdparams)
|
public void HandleEditCommandOnCurrentScene(string[] cmdparams)
|
||||||
{
|
{
|
||||||
ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
|
ForEachSelectedScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
|
public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)
|
||||||
|
|
Loading…
Reference in New Issue