aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/CommunicationsManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs47
1 files changed, 1 insertions, 46 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 3659d86..2bfe045 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -31,7 +31,6 @@ using System.Reflection;
31using libsecondlife; 31using libsecondlife;
32using log4net; 32using log4net;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
34using OpenSim.Framework.Console;
35using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
36 35
37namespace OpenSim.Framework.Communications 36namespace OpenSim.Framework.Communications
@@ -231,50 +230,6 @@ namespace OpenSim.Framework.Communications
231 230
232 #endregion 231 #endregion
233 232
234 public void doCreate(string[] cmmdParams)
235 {
236 switch (cmmdParams[0])
237 {
238 case "user":
239 string firstName;
240 string lastName;
241 string password;
242 uint regX = 1000;
243 uint regY = 1000;
244
245 if (cmmdParams.Length < 2)
246 firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
247 else firstName = cmmdParams[1];
248
249 if ( cmmdParams.Length < 3 )
250 lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
251 else lastName = cmmdParams[2];
252
253 if ( cmmdParams.Length < 4 )
254 password = MainConsole.Instance.PasswdPrompt("Password");
255 else password = cmmdParams[3];
256
257 if ( cmmdParams.Length < 5 )
258 regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
259 else regX = Convert.ToUInt32(cmmdParams[4]);
260
261 if ( cmmdParams.Length < 6 )
262 regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
263 else regY = Convert.ToUInt32(cmmdParams[5]);
264
265
266 if (null == m_userService.GetUserProfile(firstName, lastName))
267 {
268 AddUser(firstName, lastName, password, regX, regY);
269 }
270 else
271 {
272 m_log.ErrorFormat("[USERS]: A user with the name {0} {1} already exists!", firstName, lastName);
273 }
274 break;
275 }
276 }
277
278 /// <summary> 233 /// <summary>
279 /// Persistently adds a user to OpenSim. 234 /// Persistently adds a user to OpenSim.
280 /// </summary> 235 /// </summary>
@@ -283,7 +238,7 @@ namespace OpenSim.Framework.Communications
283 /// <param name="password"></param> 238 /// <param name="password"></param>
284 /// <param name="regX"></param> 239 /// <param name="regX"></param>
285 /// <param name="regY"></param> 240 /// <param name="regY"></param>
286 /// <returns>The UUID of the added user. Returns null if the add was unsuccessful</returns> 241 /// <returns>The UUID of the added user. Returns LLUUID.Zero if the add was unsuccessful</returns>
287 public LLUUID AddUser(string firstName, string lastName, string password, uint regX, uint regY) 242 public LLUUID AddUser(string firstName, string lastName, string password, uint regX, uint regY)
288 { 243 {
289 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); 244 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);