aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs74
1 files changed, 38 insertions, 36 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 7232383..d107b7a 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -232,6 +232,8 @@ namespace OpenSim
232 232
233 base.StartupSpecific(); 233 base.StartupSpecific();
234 234
235 m_stats = StatsManager.SimExtraStats;
236
235 // Create a ModuleLoader instance 237 // Create a ModuleLoader instance
236 m_moduleLoader = new ModuleLoader(m_config.Source); 238 m_moduleLoader = new ModuleLoader(m_config.Source);
237 239
@@ -247,51 +249,51 @@ namespace OpenSim
247 plugin.PostInitialise(); 249 plugin.PostInitialise();
248 } 250 }
249 251
250 if (m_console != null) 252 AddPluginCommands();
251 {
252 StatsManager.RegisterConsoleCommands(m_console);
253 AddPluginCommands(m_console);
254 }
255 } 253 }
256 254
257 protected virtual void AddPluginCommands(CommandConsole console) 255 protected virtual void AddPluginCommands()
258 { 256 {
259 List<string> topics = GetHelpTopics(); 257 // If console exists add plugin commands.
260 258 if (m_console != null)
261 foreach (string topic in topics)
262 { 259 {
263 string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); 260 List<string> topics = GetHelpTopics();
264 261
265 // This is a hack to allow the user to enter the help command in upper or lowercase. This will go 262 foreach (string topic in topics)
266 // away at some point. 263 {
267 console.Commands.AddCommand(capitalizedTopic, false, "help " + topic, 264 string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1);
268 "help " + capitalizedTopic,
269 "Get help on plugin command '" + topic + "'",
270 HandleCommanderHelp);
271 console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic,
272 "help " + capitalizedTopic,
273 "Get help on plugin command '" + topic + "'",
274 HandleCommanderHelp);
275 265
276 ICommander commander = null; 266 // This is a hack to allow the user to enter the help command in upper or lowercase. This will go
267 // away at some point.
268 m_console.Commands.AddCommand(capitalizedTopic, false, "help " + topic,
269 "help " + capitalizedTopic,
270 "Get help on plugin command '" + topic + "'",
271 HandleCommanderHelp);
272 m_console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic,
273 "help " + capitalizedTopic,
274 "Get help on plugin command '" + topic + "'",
275 HandleCommanderHelp);
277 276
278 Scene s = SceneManager.CurrentOrFirstScene; 277 ICommander commander = null;
279 278
280 if (s != null && s.GetCommanders() != null) 279 Scene s = SceneManager.CurrentOrFirstScene;
281 {
282 if (s.GetCommanders().ContainsKey(topic))
283 commander = s.GetCommanders()[topic];
284 }
285 280
286 if (commander == null) 281 if (s != null && s.GetCommanders() != null)
287 continue; 282 {
283 if (s.GetCommanders().ContainsKey(topic))
284 commander = s.GetCommanders()[topic];
285 }
288 286
289 foreach (string command in commander.Commands.Keys) 287 if (commander == null)
290 { 288 continue;
291 console.Commands.AddCommand(capitalizedTopic, false, 289
292 topic + " " + command, 290 foreach (string command in commander.Commands.Keys)
293 topic + " " + commander.Commands[command].ShortHelp(), 291 {
294 String.Empty, HandleCommanderCommand); 292 m_console.Commands.AddCommand(capitalizedTopic, false,
293 topic + " " + command,
294 topic + " " + commander.Commands[command].ShortHelp(),
295 String.Empty, HandleCommanderCommand);
296 }
295 } 297 }
296 } 298 }
297 } 299 }
@@ -621,7 +623,7 @@ namespace OpenSim
621 if (account == null) 623 if (account == null)
622 { 624 {
623 m_log.ErrorFormat( 625 m_log.ErrorFormat(
624 "[OPENSIM]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first at the grid level."); 626 "[OPENSIM]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first.");
625 } 627 }
626 else 628 else
627 { 629 {