Added "remove-region <region name>" console command that "should" remove the named region/scene.

afrisby
MW 2007-11-13 16:31:11 +00:00
parent 4bc4844646
commit 448612db62
2 changed files with 16 additions and 5 deletions

View File

@ -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();

View File

@ -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;