diff options
author | Melanie | 2012-07-28 00:39:36 +0100 |
---|---|---|
committer | Melanie | 2012-07-28 00:39:36 +0100 |
commit | 771d79e83e9ef5686aee5fe1c572673cff291083 (patch) | |
tree | b37749fc1929ffd6dd1b9c2c4e29120accf26b99 /OpenSim/Framework/RegionInfo.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | LSL/OSSL lacks Math.Min & Math.Max implementations. (diff) | |
download | opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.zip opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.tar.gz opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.tar.bz2 opensim-SC-771d79e83e9ef5686aee5fe1c572673cff291083.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Monitoring/BaseStatsCollector.cs
OpenSim/Region/Application/OpenSim.cs
OpenSim/Region/Application/OpenSimBase.cs
OpenSim/Region/Framework/Scenes/SceneManager.cs
bin/OpenMetaverse.Rendering.Meshmerizer.dll
bin/OpenMetaverse.StructuredData.dll
bin/OpenMetaverse.dll
bin/OpenMetaverseTypes.dll
prebuild.xml
Diffstat (limited to 'OpenSim/Framework/RegionInfo.cs')
-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 |