diff options
author | Melanie | 2019-08-20 23:28:59 +0100 |
---|---|---|
committer | Melanie | 2019-08-20 23:28:59 +0100 |
commit | 0fd17c08ae642fac17b24dfad06c61cfe5739483 (patch) | |
tree | 4871c96eab2f5b118cb09d670a3a4ba024cf1210 /OpenSim/Region/Application | |
parent | change PGSQL migration (diff) | |
download | opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.zip opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.gz opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.bz2 opensim-SC-0fd17c08ae642fac17b24dfad06c61cfe5739483.tar.xz |
Massive console refactor. Greatly simplify interface.
Diffstat (limited to 'OpenSim/Region/Application')
-rwxr-xr-x[-rw-r--r--] | OpenSim/Region/Application/OpenSim.cs | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | OpenSim/Region/Application/OpenSimBase.cs | 20 |
2 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ee4ddf4..6a56a36 100644..100755 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -782,8 +782,8 @@ namespace OpenSim | |||
782 | Scene existingScene; | 782 | Scene existingScene; |
783 | if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene)) | 783 | if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene)) |
784 | { | 784 | { |
785 | MainConsole.Instance.OutputFormat( | 785 | MainConsole.Instance.Output( |
786 | "ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}", | 786 | "ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}", null, |
787 | regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName); | 787 | regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName); |
788 | 788 | ||
789 | return; | 789 | return; |
@@ -980,7 +980,7 @@ namespace OpenSim | |||
980 | SceneManager.ForEachSelectedScene( | 980 | SceneManager.ForEachSelectedScene( |
981 | scene => | 981 | scene => |
982 | { | 982 | { |
983 | MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); | 983 | MainConsole.Instance.Output("Loaded region modules in {0} are:", null, scene.Name); |
984 | 984 | ||
985 | List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>(); | 985 | List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>(); |
986 | List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>(); | 986 | List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>(); |
@@ -994,10 +994,10 @@ namespace OpenSim | |||
994 | } | 994 | } |
995 | 995 | ||
996 | foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name)) | 996 | foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name)) |
997 | MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name); | 997 | MainConsole.Instance.Output("New Region Module (Shared): {0}", null, module.Name); |
998 | 998 | ||
999 | foreach (IRegionModuleBase module in nonSharedModules.OrderBy(m => m.Name)) | 999 | foreach (IRegionModuleBase module in nonSharedModules.OrderBy(m => m.Name)) |
1000 | MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name); | 1000 | MainConsole.Instance.Output("New Region Module (Non-Shared): {0}", null, module.Name); |
1001 | } | 1001 | } |
1002 | ); | 1002 | ); |
1003 | 1003 | ||
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 7a221c4..ed0f496 100644..100755 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -593,14 +593,14 @@ namespace OpenSim | |||
593 | estateOwnerPassword = Config.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null); | 593 | estateOwnerPassword = Config.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null); |
594 | } | 594 | } |
595 | 595 | ||
596 | MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName); | 596 | MainConsole.Instance.Output("Estate {0} has no owner set.", null, regionInfo.EstateSettings.EstateName); |
597 | List<char> excluded = new List<char>(new char[1]{' '}); | 597 | List<char> excluded = new List<char>(new char[1]{' '}); |
598 | 598 | ||
599 | 599 | ||
600 | if (estateOwnerFirstName == null || estateOwnerLastName == null) | 600 | if (estateOwnerFirstName == null || estateOwnerLastName == null) |
601 | { | 601 | { |
602 | estateOwnerFirstName = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded); | 602 | estateOwnerFirstName = MainConsole.Instance.Prompt("Estate owner first name", "Test", excluded); |
603 | estateOwnerLastName = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded); | 603 | estateOwnerLastName = MainConsole.Instance.Prompt("Estate owner last name", "User", excluded); |
604 | } | 604 | } |
605 | 605 | ||
606 | UserAccount account | 606 | UserAccount account |
@@ -624,13 +624,13 @@ namespace OpenSim | |||
624 | if (scene.UserAccountService is UserAccountService) | 624 | if (scene.UserAccountService is UserAccountService) |
625 | { | 625 | { |
626 | if (estateOwnerPassword == null) | 626 | if (estateOwnerPassword == null) |
627 | estateOwnerPassword = MainConsole.Instance.PasswdPrompt("Password"); | 627 | estateOwnerPassword = MainConsole.Instance.Prompt("Password", null, null, false); |
628 | 628 | ||
629 | if (estateOwnerEMail == null) | 629 | if (estateOwnerEMail == null) |
630 | estateOwnerEMail = MainConsole.Instance.CmdPrompt("Email"); | 630 | estateOwnerEMail = MainConsole.Instance.Prompt("Email"); |
631 | 631 | ||
632 | if (rawEstateOwnerUuid == null) | 632 | if (rawEstateOwnerUuid == null) |
633 | rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); | 633 | rawEstateOwnerUuid = MainConsole.Instance.Prompt("User ID", UUID.Random().ToString()); |
634 | 634 | ||
635 | UUID estateOwnerUuid = UUID.Zero; | 635 | UUID estateOwnerUuid = UUID.Zero; |
636 | if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid)) | 636 | if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid)) |
@@ -999,11 +999,11 @@ namespace OpenSim | |||
999 | if (!string.IsNullOrEmpty(estateName)) | 999 | if (!string.IsNullOrEmpty(estateName)) |
1000 | newName = estateName; | 1000 | newName = estateName; |
1001 | else | 1001 | else |
1002 | newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); | 1002 | newName = MainConsole.Instance.Prompt("New estate name", regInfo.EstateSettings.EstateName); |
1003 | 1003 | ||
1004 | if (estatesByName.ContainsKey(newName)) | 1004 | if (estatesByName.ContainsKey(newName)) |
1005 | { | 1005 | { |
1006 | MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName); | 1006 | MainConsole.Instance.Output("An estate named {0} already exists. Please try again.", null, newName); |
1007 | return false; | 1007 | return false; |
1008 | } | 1008 | } |
1009 | 1009 | ||
@@ -1086,7 +1086,7 @@ namespace OpenSim | |||
1086 | else | 1086 | else |
1087 | { | 1087 | { |
1088 | string response | 1088 | string response |
1089 | = MainConsole.Instance.CmdPrompt( | 1089 | = MainConsole.Instance.Prompt( |
1090 | string.Format( | 1090 | string.Format( |
1091 | "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), | 1091 | "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), |
1092 | "yes", | 1092 | "yes", |
@@ -1103,7 +1103,7 @@ namespace OpenSim | |||
1103 | { | 1103 | { |
1104 | string[] estateNames = estatesByName.Keys.ToArray(); | 1104 | string[] estateNames = estatesByName.Keys.ToArray(); |
1105 | response | 1105 | response |
1106 | = MainConsole.Instance.CmdPrompt( | 1106 | = MainConsole.Instance.Prompt( |
1107 | string.Format( | 1107 | string.Format( |
1108 | "Name of estate to join. Existing estate names are ({0})", | 1108 | "Name of estate to join. Existing estate names are ({0})", |
1109 | string.Join(", ", estateNames)), | 1109 | string.Join(", ", estateNames)), |