From 1b877234dada9f14cebc486cc426db892beae152 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 4 May 2009 12:15:55 +0000 Subject: Refactor. Make ConsoleBase a true base class. Create CommandConsole as a simple console capable of processing commands. Create LocalConsole as a console that uses cursor control and context help. Precursor to a distributed console system for the new grid services. No functional change intended :) --- OpenSim/Grid/UserServer/Main.cs | 4 ++-- OpenSim/Grid/UserServer/UserServerCommandModule.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Grid/UserServer') diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 0a5abd3..d9185cb 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -84,7 +84,7 @@ namespace OpenSim.Grid.UserServer public OpenUser_Main() { - m_console = new ConsoleBase("User"); + m_console = new LocalConsole("User"); MainConsole.Instance = m_console; } @@ -126,7 +126,7 @@ namespace OpenSim.Grid.UserServer m_httpServer = new BaseHttpServer(Cfg.HttpPort); - RegisterInterface(m_console); + RegisterInterface(m_console); RegisterInterface(Cfg); //Should be in modules? diff --git a/OpenSim/Grid/UserServer/UserServerCommandModule.cs b/OpenSim/Grid/UserServer/UserServerCommandModule.cs index f73b3de..1d74c80 100644 --- a/OpenSim/Grid/UserServer/UserServerCommandModule.cs +++ b/OpenSim/Grid/UserServer/UserServerCommandModule.cs @@ -49,7 +49,7 @@ namespace OpenSim.Grid.UserServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - protected ConsoleBase m_console; + protected CommandConsole m_console; protected UserConfig m_cfg; protected UserDataBaseService m_userDataBaseService; @@ -88,8 +88,8 @@ namespace OpenSim.Grid.UserServer m_loginService = loginService; } - ConsoleBase console; - if ((m_core.TryGet(out console)) && (m_cfg != null) + CommandConsole console; + if ((m_core.TryGet(out console)) && (m_cfg != null) && (m_userDataBaseService != null) && (m_loginService != null)) { RegisterConsoleCommands(console); @@ -101,7 +101,7 @@ namespace OpenSim.Grid.UserServer } - private void RegisterConsoleCommands(ConsoleBase console) + private void RegisterConsoleCommands(CommandConsole console) { m_console = console; m_console.Commands.AddCommand("userserver", false, "create user", -- cgit v1.1