diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e041eef77e..06dc900d84 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -638,6 +638,22 @@ namespace OpenSim CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener(); break; + case "remove-region": + string regName = CombineParams(cmdparams, 0); + + Scene killScene; + if(m_sceneManager.TryGetScene(regName, out killScene)) + { + if (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID) + { + m_sceneManager.TrySetCurrentScene(".."); + } + m_regionData.Remove(killScene.RegionInfo); + m_sceneManager.CloseScene(killScene); + + } + break; + case "quit": case "shutdown": Shutdown(); diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index ace178877e..1bb7d10825 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -58,11 +58,6 @@ namespace OpenSim.Region.Environment.Scenes get { return m_eventManager; } } - public RegionInfo RegionsInfo - { - get { return m_regInfo; } - } - protected string m_datastore; private uint m_nextLocalId = 8880000;