diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 82b2fd4..787d025 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -349,9 +349,6 @@ namespace OpenSim | |||
349 | 349 | ||
350 | if (ConfigurationSettings.Standalone) | 350 | if (ConfigurationSettings.Standalone) |
351 | { | 351 | { |
352 | m_console.Commands.AddCommand("region", false, "create user", | ||
353 | "create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]", | ||
354 | "Create a new user", HandleCreateUser); | ||
355 | 352 | ||
356 | m_console.Commands.AddCommand("region", false, "reset user password", | 353 | m_console.Commands.AddCommand("region", false, "reset user password", |
357 | "reset user password [<first> [<last> [<password>]]]", | 354 | "reset user password [<first> [<last> [<password>]]]", |
@@ -813,22 +810,6 @@ namespace OpenSim | |||
813 | } | 810 | } |
814 | 811 | ||
815 | /// <summary> | 812 | /// <summary> |
816 | /// Execute switch for some of the create commands | ||
817 | /// </summary> | ||
818 | /// <param name="args"></param> | ||
819 | private void HandleCreateUser(string module, string[] cmd) | ||
820 | { | ||
821 | if (ConfigurationSettings.Standalone) | ||
822 | { | ||
823 | CreateUser(cmd); | ||
824 | } | ||
825 | else | ||
826 | { | ||
827 | m_log.Info("Create user is not available in grid mode, use the user server."); | ||
828 | } | ||
829 | } | ||
830 | |||
831 | /// <summary> | ||
832 | /// Execute switch for some of the reset commands | 813 | /// Execute switch for some of the reset commands |
833 | /// </summary> | 814 | /// </summary> |
834 | /// <param name="args"></param> | 815 | /// <param name="args"></param> |
@@ -1076,61 +1057,6 @@ namespace OpenSim | |||
1076 | } | 1057 | } |
1077 | 1058 | ||
1078 | /// <summary> | 1059 | /// <summary> |
1079 | /// Create a new user | ||
1080 | /// </summary> | ||
1081 | /// <param name="cmdparams">string array with parameters: firstname, lastname, password, locationX, locationY, email</param> | ||
1082 | protected void CreateUser(string[] cmdparams) | ||
1083 | { | ||
1084 | string firstName; | ||
1085 | string lastName; | ||
1086 | string password; | ||
1087 | string email; | ||
1088 | uint regX = 1000; | ||
1089 | uint regY = 1000; | ||
1090 | |||
1091 | IConfig standalone; | ||
1092 | if ((standalone = m_config.Source.Configs["StandAlone"]) != null) | ||
1093 | { | ||
1094 | regX = (uint)standalone.GetInt("default_location_x", (int)regX); | ||
1095 | regY = (uint)standalone.GetInt("default_location_y", (int)regY); | ||
1096 | } | ||
1097 | |||
1098 | |||
1099 | if (cmdparams.Length < 3) | ||
1100 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); | ||
1101 | else firstName = cmdparams[2]; | ||
1102 | |||
1103 | if (cmdparams.Length < 4) | ||
1104 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); | ||
1105 | else lastName = cmdparams[3]; | ||
1106 | |||
1107 | if (cmdparams.Length < 5) | ||
1108 | password = MainConsole.Instance.PasswdPrompt("Password"); | ||
1109 | else password = cmdparams[4]; | ||
1110 | |||
1111 | if (cmdparams.Length < 6) | ||
1112 | regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString())); | ||
1113 | else regX = Convert.ToUInt32(cmdparams[5]); | ||
1114 | |||
1115 | if (cmdparams.Length < 7) | ||
1116 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); | ||
1117 | else regY = Convert.ToUInt32(cmdparams[6]); | ||
1118 | |||
1119 | if (cmdparams.Length < 8) | ||
1120 | email = MainConsole.Instance.CmdPrompt("Email", ""); | ||
1121 | else email = cmdparams[7]; | ||
1122 | |||
1123 | if (null == m_commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName)) | ||
1124 | { | ||
1125 | m_commsManager.UserAdminService.AddUser(firstName, lastName, password, email, regX, regY); | ||
1126 | } | ||
1127 | else | ||
1128 | { | ||
1129 | m_log.ErrorFormat("[CONSOLE]: A user with the name {0} {1} already exists!", firstName, lastName); | ||
1130 | } | ||
1131 | } | ||
1132 | |||
1133 | /// <summary> | ||
1134 | /// Reset a user password. | 1060 | /// Reset a user password. |
1135 | /// </summary> | 1061 | /// </summary> |
1136 | /// <param name="cmdparams"></param> | 1062 | /// <param name="cmdparams"></param> |