diff options
author | Melanie | 2012-10-12 19:05:06 +0100 |
---|---|---|
committer | Melanie | 2012-10-12 19:05:06 +0100 |
commit | 6ce93b22d1bc0f2a89c0d7a8d79bfe8c85a2d9b4 (patch) | |
tree | d81136f8cc2c602d5cc6b783e5cb3d23343a089e /OpenSim/Region/Application/OpenSimBase.cs | |
parent | Merge branch 'avination' into careminster (diff) | |
parent | BulletSim: only use native sphere shape if it is a sphere. (diff) | |
download | opensim-SC_OLD-6ce93b22d1bc0f2a89c0d7a8d79bfe8c85a2d9b4.zip opensim-SC_OLD-6ce93b22d1bc0f2a89c0d7a8d79bfe8c85a2d9b4.tar.gz opensim-SC_OLD-6ce93b22d1bc0f2a89c0d7a8d79bfe8c85a2d9b4.tar.bz2 opensim-SC_OLD-6ce93b22d1bc0f2a89c0d7a8d79bfe8c85a2d9b4.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 72 |
1 files changed, 35 insertions, 37 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index d107b7a..b410a0e 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 | } |