aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs27
3 files changed, 13 insertions, 18 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 20e00e3..4075edb 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -809,7 +809,7 @@ namespace OpenSim
809 break; 809 break;
810 810
811 case "modules": 811 case "modules":
812 SceneManager.ForEachScene( 812 SceneManager.ForEachSelectedScene(
813 scene => 813 scene =>
814 { 814 {
815 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); 815 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 3c8e199..c555915 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -668,7 +668,7 @@ namespace OpenSim
668 // listenIP = IPAddress.Parse("0.0.0.0"); 668 // listenIP = IPAddress.Parse("0.0.0.0");
669 669
670 uint port = (uint) regionInfo.InternalEndPoint.Port; 670 uint port = (uint) regionInfo.InternalEndPoint.Port;
671 IClientNetworkServer clientNetworkServer; 671
672 if (m_autoCreateClientStack) 672 if (m_autoCreateClientStack)
673 { 673 {
674 clientNetworkServers = m_clientStackManager.CreateServers( 674 clientNetworkServers = m_clientStackManager.CreateServers(
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 1e2e973..780bd01 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -331,35 +331,30 @@ namespace OpenSim.Region.Framework.Scenes
331 331
332 public void SendCommandToPluginModules(string[] cmdparams) 332 public void SendCommandToPluginModules(string[] cmdparams)
333 { 333 {
334 ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); }); 334 ForEachSelectedScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
335 } 335 }
336 336
337 public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions) 337 public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
338 { 338 {
339 ForEachCurrentScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); }); 339 ForEachSelectedScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
340 } 340 }
341 341
342 private void ForEachCurrentScene(Action<Scene> func) 342 public void ForEachSelectedScene(Action<Scene> func)
343 { 343 {
344 if (CurrentScene == null) 344 if (CurrentScene == null)
345 { 345 ForEachScene(func);
346 lock (m_localScenes)
347 m_localScenes.ForEach(func);
348 }
349 else 346 else
350 {
351 func(CurrentScene); 347 func(CurrentScene);
352 }
353 } 348 }
354 349
355 public void RestartCurrentScene() 350 public void RestartCurrentScene()
356 { 351 {
357 ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); }); 352 ForEachSelectedScene(delegate(Scene scene) { scene.RestartNow(); });
358 } 353 }
359 354
360 public void BackupCurrentScene() 355 public void BackupCurrentScene()
361 { 356 {
362 ForEachCurrentScene(delegate(Scene scene) { scene.Backup(true); }); 357 ForEachSelectedScene(delegate(Scene scene) { scene.Backup(true); });
363 } 358 }
364 359
365 public bool TrySetCurrentScene(string regionName) 360 public bool TrySetCurrentScene(string regionName)
@@ -490,7 +485,7 @@ namespace OpenSim.Region.Framework.Scenes
490 /// <param name="name">Name of avatar to debug</param> 485 /// <param name="name">Name of avatar to debug</param>
491 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) 486 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
492 { 487 {
493 ForEachCurrentScene(scene => 488 ForEachSelectedScene(scene =>
494 scene.ForEachScenePresence(sp => 489 scene.ForEachScenePresence(sp =>
495 { 490 {
496 if (name == null || sp.Name == name) 491 if (name == null || sp.Name == name)
@@ -509,7 +504,7 @@ namespace OpenSim.Region.Framework.Scenes
509 { 504 {
510 List<ScenePresence> avatars = new List<ScenePresence>(); 505 List<ScenePresence> avatars = new List<ScenePresence>();
511 506
512 ForEachCurrentScene( 507 ForEachSelectedScene(
513 delegate(Scene scene) 508 delegate(Scene scene)
514 { 509 {
515 scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) 510 scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
@@ -526,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes
526 { 521 {
527 List<ScenePresence> presences = new List<ScenePresence>(); 522 List<ScenePresence> presences = new List<ScenePresence>();
528 523
529 ForEachCurrentScene(delegate(Scene scene) 524 ForEachSelectedScene(delegate(Scene scene)
530 { 525 {
531 scene.ForEachScenePresence(delegate(ScenePresence sp) 526 scene.ForEachScenePresence(delegate(ScenePresence sp)
532 { 527 {
@@ -555,12 +550,12 @@ namespace OpenSim.Region.Framework.Scenes
555 550
556 public void ForceCurrentSceneClientUpdate() 551 public void ForceCurrentSceneClientUpdate()
557 { 552 {
558 ForEachCurrentScene(delegate(Scene scene) { scene.ForceClientUpdate(); }); 553 ForEachSelectedScene(delegate(Scene scene) { scene.ForceClientUpdate(); });
559 } 554 }
560 555
561 public void HandleEditCommandOnCurrentScene(string[] cmdparams) 556 public void HandleEditCommandOnCurrentScene(string[] cmdparams)
562 { 557 {
563 ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); }); 558 ForEachSelectedScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
564 } 559 }
565 560
566 public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar) 561 public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)