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