diff options
Added "remove-region <region name>" console command that "should" remove the named region/scene.
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e041eef..06dc900 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -638,6 +638,22 @@ namespace OpenSim | |||
638 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener(); | 638 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener(); |
639 | break; | 639 | break; |
640 | 640 | ||
641 | case "remove-region": | ||
642 | string regName = CombineParams(cmdparams, 0); | ||
643 | |||
644 | Scene killScene; | ||
645 | if(m_sceneManager.TryGetScene(regName, out killScene)) | ||
646 | { | ||
647 | if (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID) | ||
648 | { | ||
649 | m_sceneManager.TrySetCurrentScene(".."); | ||
650 | } | ||
651 | m_regionData.Remove(killScene.RegionInfo); | ||
652 | m_sceneManager.CloseScene(killScene); | ||
653 | |||
654 | } | ||
655 | break; | ||
656 | |||
641 | case "quit": | 657 | case "quit": |
642 | case "shutdown": | 658 | case "shutdown": |
643 | Shutdown(); | 659 | Shutdown(); |