aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorCharles Krinke2009-07-08 20:53:22 +0000
committerCharles Krinke2009-07-08 20:53:22 +0000
commit525ab2c2780d093e6f72d2054dca998620dd4629 (patch)
tree60fafa5cf6e309c096b33df3ecb44c3460ebc950 /OpenSim/Region/Application
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-525ab2c2780d093e6f72d2054dca998620dd4629.zip
opensim-SC_OLD-525ab2c2780d093e6f72d2054dca998620dd4629.tar.gz
opensim-SC_OLD-525ab2c2780d093e6f72d2054dca998620dd4629.tar.bz2
opensim-SC_OLD-525ab2c2780d093e6f72d2054dca998620dd4629.tar.xz
Thank you kindly, RandomHuman for a patch that:
The admin_close_region method removes a region from the simulator without deleting it. The region can then be recreated by calling admin_create_region with the same UUID. There is also a change to admin_create_region to facilitate this.The reason I want to have this functionality is to make it possible to detach regions when they are idle and recreate them on demand through a web interface. It's probably doable using the existing methods by saving and loading oars, but it also doesn't seem like that should be necessary.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 9e3dafb..a42fd3d 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -504,6 +504,37 @@ namespace OpenSim
504 } 504 }
505 505
506 /// <summary> 506 /// <summary>
507 /// Remove a region from the simulator without deleting it permanently.
508 /// </summary>
509 /// <param name="scene"></param>
510 /// <returns></returns>
511 public void CloseRegion(Scene scene)
512 {
513 // only need to check this if we are not at the
514 // root level
515 if ((m_sceneManager.CurrentScene != null) &&
516 (m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
517 {
518 m_sceneManager.TrySetCurrentScene("..");
519 }
520
521 m_sceneManager.CloseScene(scene);
522
523 }
524
525 /// <summary>
526 /// Remove a region from the simulator without deleting it permanently.
527 /// </summary>
528 /// <param name="name"></param>
529 /// <returns></returns>
530 public void CloseRegion(string name)
531 {
532 Scene target;
533 if (m_sceneManager.TryGetScene(name, out target))
534 CloseRegion(target);
535 }
536
537 /// <summary>
507 /// Create a scene and its initial base structures. 538 /// Create a scene and its initial base structures.
508 /// </summary> 539 /// </summary>
509 /// <param name="regionInfo"></param> 540 /// <param name="regionInfo"></param>