From e595959d97f35bf866801fff8b9ceb1ed35b3825 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 29 Jul 2008 17:39:15 +0000 Subject: * refactor: move create user console command parsing down to OpenSim.cs from CommunicationsManager --- .../Communications/CommunicationsManager.cs | 47 +--------------------- 1 file changed, 1 insertion(+), 46 deletions(-) (limited to 'OpenSim/Framework') 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; using libsecondlife; using log4net; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; namespace OpenSim.Framework.Communications @@ -231,50 +230,6 @@ namespace OpenSim.Framework.Communications #endregion - public void doCreate(string[] cmmdParams) - { - switch (cmmdParams[0]) - { - case "user": - string firstName; - string lastName; - string password; - uint regX = 1000; - uint regY = 1000; - - if (cmmdParams.Length < 2) - firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); - else firstName = cmmdParams[1]; - - if ( cmmdParams.Length < 3 ) - lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); - else lastName = cmmdParams[2]; - - if ( cmmdParams.Length < 4 ) - password = MainConsole.Instance.PasswdPrompt("Password"); - else password = cmmdParams[3]; - - if ( cmmdParams.Length < 5 ) - regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString())); - else regX = Convert.ToUInt32(cmmdParams[4]); - - if ( cmmdParams.Length < 6 ) - regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); - else regY = Convert.ToUInt32(cmmdParams[5]); - - - if (null == m_userService.GetUserProfile(firstName, lastName)) - { - AddUser(firstName, lastName, password, regX, regY); - } - else - { - m_log.ErrorFormat("[USERS]: A user with the name {0} {1} already exists!", firstName, lastName); - } - break; - } - } - /// /// Persistently adds a user to OpenSim. /// @@ -283,7 +238,7 @@ namespace OpenSim.Framework.Communications /// /// /// - /// The UUID of the added user. Returns null if the add was unsuccessful + /// The UUID of the added user. Returns LLUUID.Zero if the add was unsuccessful public LLUUID AddUser(string firstName, string lastName, string password, uint regX, uint regY) { string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); -- cgit v1.1