Get "show modules" console command to obey selected command line region/s

user_profiles
Justin Clark-Casey (justincc) 2013-02-27 22:31:47 +00:00
parent 647cb278c7
commit 0e8ec5649e
3 changed files with 13 additions and 18 deletions

View File

@ -809,7 +809,7 @@ namespace OpenSim
break; break;
case "modules": case "modules":
SceneManager.ForEachScene( SceneManager.ForEachSelectedScene(
scene => scene =>
{ {
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);

View File

@ -668,7 +668,7 @@ namespace OpenSim
// listenIP = IPAddress.Parse("0.0.0.0"); // listenIP = IPAddress.Parse("0.0.0.0");
uint port = (uint) regionInfo.InternalEndPoint.Port; uint port = (uint) regionInfo.InternalEndPoint.Port;
IClientNetworkServer clientNetworkServer;
if (m_autoCreateClientStack) if (m_autoCreateClientStack)
{ {
clientNetworkServers = m_clientStackManager.CreateServers( clientNetworkServers = m_clientStackManager.CreateServers(

View File

@ -331,35 +331,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)
@ -490,7 +485,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)
@ -509,7 +504,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)
@ -526,7 +521,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)
{ {
@ -555,12 +550,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)