diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 1b2f681..4bde7be 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -482,9 +482,16 @@ namespace OpenSim.Framework | |||
482 | MainConsole.Instance.Output("=====================================\n"); | 482 | MainConsole.Instance.Output("=====================================\n"); |
483 | 483 | ||
484 | if (name == String.Empty) | 484 | if (name == String.Empty) |
485 | name = MainConsole.Instance.CmdPrompt("New region name", name); | 485 | { |
486 | if (name == String.Empty) | 486 | while (name.Trim() == string.Empty) |
487 | throw new Exception("Cannot interactively create region with no name"); | 487 | { |
488 | name = MainConsole.Instance.CmdPrompt("New region name", name); | ||
489 | if (name.Trim() == string.Empty) | ||
490 | { | ||
491 | MainConsole.Instance.Output("Cannot interactively create region with no name"); | ||
492 | } | ||
493 | } | ||
494 | } | ||
488 | 495 | ||
489 | source.AddConfig(name); | 496 | source.AddConfig(name); |
490 | 497 | ||
@@ -515,15 +522,20 @@ namespace OpenSim.Framework | |||
515 | // | 522 | // |
516 | allKeys.Remove("RegionUUID"); | 523 | allKeys.Remove("RegionUUID"); |
517 | string regionUUID = config.GetString("RegionUUID", string.Empty); | 524 | string regionUUID = config.GetString("RegionUUID", string.Empty); |
518 | if (regionUUID == String.Empty) | 525 | if (!UUID.TryParse(regionUUID.Trim(), out RegionID)) |
519 | { | 526 | { |
520 | UUID newID = UUID.Random(); | 527 | UUID newID = UUID.Random(); |
521 | 528 | while (RegionID == UUID.Zero) | |
522 | regionUUID = MainConsole.Instance.CmdPrompt("RegionUUID", newID.ToString()); | 529 | { |
530 | regionUUID = MainConsole.Instance.CmdPrompt("RegionUUID", newID.ToString()); | ||
531 | if (!UUID.TryParse(regionUUID.Trim(), out RegionID)) | ||
532 | { | ||
533 | MainConsole.Instance.Output("RegionUUID must be a valid UUID"); | ||
534 | } | ||
535 | } | ||
523 | config.Set("RegionUUID", regionUUID); | 536 | config.Set("RegionUUID", regionUUID); |
524 | } | 537 | } |
525 | 538 | ||
526 | RegionID = new UUID(regionUUID); | ||
527 | originRegionID = RegionID; // What IS this?! (Needed for RegionCombinerModule?) | 539 | originRegionID = RegionID; // What IS this?! (Needed for RegionCombinerModule?) |
528 | 540 | ||
529 | // Location | 541 | // Location |