aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/Main.cs
diff options
context:
space:
mode:
authorMW2009-02-24 17:57:26 +0000
committerMW2009-02-24 17:57:26 +0000
commit1e2835a10c104b049c5552c64f77309b88f5650e (patch)
treea81f400318476e3f34392eeea5f09b6e34fcc3ee /OpenSim/Grid/UserServer/Main.cs
parentSame treatment for the MessagingServer... added OpenSim.Grid.MessagingServer.... (diff)
downloadopensim-SC_OLD-1e2835a10c104b049c5552c64f77309b88f5650e.zip
opensim-SC_OLD-1e2835a10c104b049c5552c64f77309b88f5650e.tar.gz
opensim-SC_OLD-1e2835a10c104b049c5552c64f77309b88f5650e.tar.bz2
opensim-SC_OLD-1e2835a10c104b049c5552c64f77309b88f5650e.tar.xz
More refactoring of the Grid/user/messaging servers.
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs30
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 61f9800..49b0071 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -67,8 +67,6 @@ namespace OpenSim.Grid.UserServer
67 67
68 protected UserServerCommandModule m_consoleCommandModule; 68 protected UserServerCommandModule m_consoleCommandModule;
69 69
70 private UUID m_lastCreatedUser = UUID.Random();
71
72 public static void Main(string[] args) 70 public static void Main(string[] args)
73 { 71 {
74 XmlConfigurator.Configure(); 72 XmlConfigurator.Configure();
@@ -127,7 +125,11 @@ namespace OpenSim.Grid.UserServer
127 125
128 m_messagesService = new MessageServersConnector(); 126 m_messagesService = new MessageServersConnector();
129 127
130 m_consoleCommandModule = new UserServerCommandModule(m_console, Cfg, m_userDataBaseService, m_loginService); 128 m_consoleCommandModule = new UserServerCommandModule(Cfg, m_userDataBaseService, m_loginService);
129 m_consoleCommandModule.Initialise(this);
130
131 //PostInitialise the modules
132 m_consoleCommandModule.PostInitialise();
131 133
132 //register event handlers 134 //register event handlers
133 RegisterEventHandlers(); 135 RegisterEventHandlers();
@@ -178,7 +180,7 @@ namespace OpenSim.Grid.UserServer
178 180
179 protected virtual void RegisterConsoleCommands() 181 protected virtual void RegisterConsoleCommands()
180 { 182 {
181 m_consoleCommandModule.RegisterConsoleCommands(); 183 m_consoleCommandModule.RegisterConsoleCommands(m_console);
182 } 184 }
183 185
184 protected virtual void RegisterHttpHandlers() 186 protected virtual void RegisterHttpHandlers()
@@ -201,7 +203,9 @@ namespace OpenSim.Grid.UserServer
201 } 203 }
202 204
203 #region IUGAIMCore 205 #region IUGAIMCore
204 private readonly Dictionary<Type, object> m_moduleInterfaces = new Dictionary<Type, object>(); 206 protected Dictionary<Type, object> m_moduleInterfaces = new Dictionary<Type, object>();
207 protected List<ShowHelpDelegate> m_showHelpDelegates = new List<ShowHelpDelegate>();
208
205 209
206 /// <summary> 210 /// <summary>
207 /// Register an Module interface. 211 /// Register an Module interface.
@@ -239,6 +243,14 @@ namespace OpenSim.Grid.UserServer
239 { 243 {
240 return m_httpServer; 244 return m_httpServer;
241 } 245 }
246
247 public void RegisterConsoleHelpDelegate(ShowHelpDelegate showHelp)
248 {
249 lock (m_showHelpDelegates)
250 {
251 m_showHelpDelegates.Add(showHelp);
252 }
253 }
242 #endregion 254 #endregion
243 255
244 #region Console Command Handlers 256 #region Console Command Handlers
@@ -247,7 +259,13 @@ namespace OpenSim.Grid.UserServer
247 { 259 {
248 base.ShowHelp(helpArgs); 260 base.ShowHelp(helpArgs);
249 261
250 m_consoleCommandModule.ShowHelp(helpArgs); 262 lock (m_showHelpDelegates)
263 {
264 foreach (ShowHelpDelegate d in m_showHelpDelegates)
265 {
266 d(helpArgs);
267 }
268 }
251 } 269 }
252 #endregion 270 #endregion
253 271