diff options
author | randomhuman | 2010-08-13 16:08:43 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-13 23:29:01 +0100 |
commit | 8eeb3f2fd21c05f0bfd141e333f34c4c69e8865b (patch) | |
tree | 90e2127451904c4e40d3c5382bbc96188ad7e004 /OpenSim/Region/Application/OpenSimBase.cs | |
parent | minor: remove mono compiler warnings (diff) | |
download | opensim-SC_OLD-8eeb3f2fd21c05f0bfd141e333f34c4c69e8865b.zip opensim-SC_OLD-8eeb3f2fd21c05f0bfd141e333f34c4c69e8865b.tar.gz opensim-SC_OLD-8eeb3f2fd21c05f0bfd141e333f34c4c69e8865b.tar.bz2 opensim-SC_OLD-8eeb3f2fd21c05f0bfd141e333f34c4c69e8865b.tar.xz |
Updated the create_region command in the RemoteAdmin plugin to properly support estates without seeking further input on the console.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index e148cde..eb18e83 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -790,6 +790,60 @@ namespace OpenSim | |||
790 | { | 790 | { |
791 | regionnum = m_sceneManager.Scenes.Count; | 791 | regionnum = m_sceneManager.Scenes.Count; |
792 | } | 792 | } |
793 | |||
794 | /// <summary> | ||
795 | /// Load the estate information for the provided RegionInfo object. | ||
796 | /// </summary> | ||
797 | /// <param name="regInfo"> | ||
798 | /// A <see cref="RegionInfo"/> | ||
799 | /// </param> | ||
800 | public void PopulateRegionEstateInfo(RegionInfo regInfo) | ||
801 | { | ||
802 | if (m_storageManager.EstateDataStore != null) | ||
803 | { | ||
804 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false); | ||
805 | } | ||
806 | |||
807 | if (regInfo.EstateSettings.EstateID == 0) // No record at all | ||
808 | { | ||
809 | MainConsole.Instance.Output("Your region is not part of an estate."); | ||
810 | while (true) | ||
811 | { | ||
812 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"}); | ||
813 | if (response == "no") | ||
814 | { | ||
815 | // Create a new estate | ||
816 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true); | ||
817 | |||
818 | regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); | ||
819 | //regInfo.EstateSettings.Save(); | ||
820 | break; | ||
821 | } | ||
822 | else | ||
823 | { | ||
824 | response = MainConsole.Instance.CmdPrompt("Estate name to join", "None"); | ||
825 | if (response == "None") | ||
826 | continue; | ||
827 | |||
828 | List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response); | ||
829 | if (estateIDs.Count < 1) | ||
830 | { | ||
831 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); | ||
832 | continue; | ||
833 | } | ||
834 | |||
835 | int estateID = estateIDs[0]; | ||
836 | |||
837 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID); | ||
838 | |||
839 | if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID)) | ||
840 | break; | ||
841 | |||
842 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | ||
843 | } | ||
844 | } | ||
845 | } | ||
846 | } | ||
793 | } | 847 | } |
794 | 848 | ||
795 | 849 | ||