aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserServerCommandModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/UserServerCommandModule.cs31
1 files changed, 22 insertions, 9 deletions
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
55 protected UserDataBaseService m_userDataBaseService; 55 protected UserDataBaseService m_userDataBaseService;
56 protected UserLoginService m_loginService; 56 protected UserLoginService m_loginService;
57 57
58 private UUID m_lastCreatedUser = UUID.Random(); 58 protected UUID m_lastCreatedUser = UUID.Random();
59 59
60 public UserServerCommandModule(ConsoleBase console, UserConfig cfg, UserDataBaseService userDBservice, UserLoginService loginService) 60 protected IUGAIMCore m_core;
61
62 public UserServerCommandModule(UserConfig cfg, UserDataBaseService userDBservice, UserLoginService loginService)
61 { 63 {
62 m_console = console;
63 Cfg = cfg; 64 Cfg = cfg;
64 m_userDataBaseService = userDBservice; 65 m_userDataBaseService = userDBservice;
65 m_loginService = loginService; 66 m_loginService = loginService;
66 } 67 }
67 68
68 public virtual void RegisterConsoleCommands() 69 public void Initialise(IUGAIMCore core)
70 {
71 m_core = core;
72 }
73
74 public void PostInitialise()
75 {
76 m_core.RegisterConsoleHelpDelegate(ShowHelp);
77 }
78
79 public void RegisterHandlers(BaseHttpServer httpServer)
69 { 80 {
81
82 }
83
84 public void RegisterConsoleCommands(ConsoleBase console)
85 {
86 m_console = console;
70 m_console.Commands.AddCommand("userserver", false, "create user", 87 m_console.Commands.AddCommand("userserver", false, "create user",
71 "create user [<first> [<last> [<x> <y> [email]]]]", 88 "create user [<first> [<last> [<x> <y> [email]]]]",
72 "Create a new user account", RunCommand); 89 "Create a new user account", RunCommand);
@@ -95,10 +112,6 @@ namespace OpenSim.Grid.UserServer
95 m_console.Commands.AddCommand("userserver", false, "logoff-user", 112 m_console.Commands.AddCommand("userserver", false, "logoff-user",
96 "logoff-user <first> <last> <message>", 113 "logoff-user <first> <last> <message>",
97 "Log off a named user", RunCommand); 114 "Log off a named user", RunCommand);
98
99 m_console.Commands.AddCommand("userserver", false, "test-command",
100 "test-command",
101 "test command", HandleTestCommand);
102 } 115 }
103 116
104 #region Console Command Handlers 117 #region Console Command Handlers
@@ -335,7 +348,7 @@ namespace OpenSim.Grid.UserServer
335 } 348 }
336 } 349 }
337 350
338 public virtual void ShowHelp(string[] helpArgs) 351 public void ShowHelp(string[] helpArgs)
339 { 352 {
340 m_console.Notice("create user - create a new user"); 353 m_console.Notice("create user - create a new user");
341 m_console.Notice("logoff-user <firstname> <lastname> <message> - logs off the specified user from the grid"); 354 m_console.Notice("logoff-user <firstname> <lastname> <message> - logs off the specified user from the grid");