Make create region save the new region to ini file format if the name

specifies an ini file.
If the ini file exists, the region will be added.
This commit is contained in:
Melanie Thielker
2009-06-25 23:31:55 +00:00
parent 82305b0dea
commit 7cc69ac97f
2 changed files with 36 additions and 10 deletions

View File

@@ -262,10 +262,17 @@ namespace OpenSim.Framework
return;
}
IConfigSource source = new IniConfigSource(filename);
IniConfigSource source = new IniConfigSource(filename);
bool saveFile = false;
if (source.Configs[configName] == null)
saveFile = true;
ReadNiniConfig(source, configName);
if (configName != String.Empty && saveFile)
source.Save(filename);
return;
}
@@ -406,7 +413,8 @@ namespace OpenSim.Framework
if (source.Configs.Count == 0)
{
name = MainConsole.Instance.CmdPrompt("New region name", String.Empty);
if (name == String.Empty)
name = MainConsole.Instance.CmdPrompt("New region name", name);
if (name == String.Empty)
throw new Exception("Cannot interactively create region with no name");