From 1e2835a10c104b049c5552c64f77309b88f5650e Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 24 Feb 2009 17:57:26 +0000 Subject: More refactoring of the Grid/user/messaging servers. --- OpenSim/Grid/UserServer/UserServerCommandModule.cs | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'OpenSim/Grid/UserServer/UserServerCommandModule.cs') diff --git a/OpenSim/Grid/UserServer/UserServerCommandModule.cs b/OpenSim/Grid/UserServer/UserServerCommandModule.cs index fbdd73f..f3dfc23 100644 --- a/OpenSim/Grid/UserServer/UserServerCommandModule.cs +++ b/OpenSim/Grid/UserServer/UserServerCommandModule.cs @@ -55,18 +55,35 @@ namespace OpenSim.Grid.UserServer protected UserDataBaseService m_userDataBaseService; protected UserLoginService m_loginService; - private UUID m_lastCreatedUser = UUID.Random(); + protected UUID m_lastCreatedUser = UUID.Random(); - public UserServerCommandModule(ConsoleBase console, UserConfig cfg, UserDataBaseService userDBservice, UserLoginService loginService) + protected IUGAIMCore m_core; + + public UserServerCommandModule(UserConfig cfg, UserDataBaseService userDBservice, UserLoginService loginService) { - m_console = console; Cfg = cfg; m_userDataBaseService = userDBservice; m_loginService = loginService; } - public virtual void RegisterConsoleCommands() + public void Initialise(IUGAIMCore core) + { + m_core = core; + } + + public void PostInitialise() + { + m_core.RegisterConsoleHelpDelegate(ShowHelp); + } + + public void RegisterHandlers(BaseHttpServer httpServer) { + + } + + public void RegisterConsoleCommands(ConsoleBase console) + { + m_console = console; m_console.Commands.AddCommand("userserver", false, "create user", "create user [ [ [ [email]]]]", "Create a new user account", RunCommand); @@ -95,10 +112,6 @@ namespace OpenSim.Grid.UserServer m_console.Commands.AddCommand("userserver", false, "logoff-user", "logoff-user ", "Log off a named user", RunCommand); - - m_console.Commands.AddCommand("userserver", false, "test-command", - "test-command", - "test command", HandleTestCommand); } #region Console Command Handlers @@ -335,7 +348,7 @@ namespace OpenSim.Grid.UserServer } } - public virtual void ShowHelp(string[] helpArgs) + public void ShowHelp(string[] helpArgs) { m_console.Notice("create user - create a new user"); m_console.Notice("logoff-user - logs off the specified user from the grid"); -- cgit v1.1