aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-08 01:51:37 +0000
committerJustin Clark-Casey (justincc)2012-03-08 01:51:37 +0000
commit749c3fef8ad2d3af97fcd9ab9c72740675e46715 (patch)
tree068e6adc89dc50386413d85064e80e3114e3fd49 /OpenSim/Region/Application/OpenSim.cs
parentminor: make NPC tests run in a given order, comment out log lines in mock reg... (diff)
downloadopensim-SC_OLD-749c3fef8ad2d3af97fcd9ab9c72740675e46715.zip
opensim-SC_OLD-749c3fef8ad2d3af97fcd9ab9c72740675e46715.tar.gz
opensim-SC_OLD-749c3fef8ad2d3af97fcd9ab9c72740675e46715.tar.bz2
opensim-SC_OLD-749c3fef8ad2d3af97fcd9ab9c72740675e46715.tar.xz
Change "help" to display categories/module list then "help <category/module>" to display commands in a category.
This is to deal with the hundred lines of command splurge when one previously typed "help" Modelled somewhat on the mysql console One can still type help <command> to get per command help at any point. Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet). Does not affect command parsing or any other aspects of the console apart from the help system. Backwards compatible with existing modules.
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs87
1 files changed, 37 insertions, 50 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 145875b..a46ce7f 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -225,12 +225,12 @@ namespace OpenSim
225 /// </summary> 225 /// </summary>
226 private void RegisterConsoleCommands() 226 private void RegisterConsoleCommands()
227 { 227 {
228 m_console.Commands.AddCommand("region", false, "force update", 228 m_console.Commands.AddCommand("Regions", false, "force update",
229 "force update", 229 "force update",
230 "Force the update of all objects on clients", 230 "Force the update of all objects on clients",
231 HandleForceUpdate); 231 HandleForceUpdate);
232 232
233 m_console.Commands.AddCommand("region", false, "debug packet", 233 m_console.Commands.AddCommand("Comms", false, "debug packet",
234 "debug packet <level> [<avatar-first-name> <avatar-last-name>]", 234 "debug packet <level> [<avatar-first-name> <avatar-last-name>]",
235 "Turn on packet debugging", 235 "Turn on packet debugging",
236 "If level > 255 then all incoming and outgoing packets are logged.\n" 236 "If level > 255 then all incoming and outgoing packets are logged.\n"
@@ -242,7 +242,7 @@ namespace OpenSim
242 + "If an avatar name is given then only packets from that avatar are logged", 242 + "If an avatar name is given then only packets from that avatar are logged",
243 Debug); 243 Debug);
244 244
245 m_console.Commands.AddCommand("region", false, "debug http", 245 m_console.Commands.AddCommand("Comms", false, "debug http",
246 "debug http <level>", 246 "debug http <level>",
247 "Turn on inbound http request debugging for everything except the event queue (see debug eq).", 247 "Turn on inbound http request debugging for everything except the event queue (see debug eq).",
248 "If level >= 2 then the handler used to service the request is logged.\n" 248 "If level >= 2 then the handler used to service the request is logged.\n"
@@ -250,37 +250,37 @@ namespace OpenSim
250 + "If level <= 0 then no extra http logging is done.\n", 250 + "If level <= 0 then no extra http logging is done.\n",
251 Debug); 251 Debug);
252 252
253 m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); 253 m_console.Commands.AddCommand("Comms", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
254 254
255 m_console.Commands.AddCommand("region", false, "debug scene", 255 m_console.Commands.AddCommand("Regions", false, "debug scene",
256 "debug scene <scripting> <collisions> <physics>", 256 "debug scene <scripting> <collisions> <physics>",
257 "Turn on scene debugging", Debug); 257 "Turn on scene debugging", Debug);
258 258
259 m_console.Commands.AddCommand("region", false, "change region", 259 m_console.Commands.AddCommand("Regions", false, "change region",
260 "change region <region name>", 260 "change region <region name>",
261 "Change current console region", ChangeSelectedRegion); 261 "Change current console region", ChangeSelectedRegion);
262 262
263 m_console.Commands.AddCommand("region", false, "save xml", 263 m_console.Commands.AddCommand("Archiving", false, "save xml",
264 "save xml", 264 "save xml",
265 "Save a region's data in XML format", SaveXml); 265 "Save a region's data in XML format", SaveXml);
266 266
267 m_console.Commands.AddCommand("region", false, "save xml2", 267 m_console.Commands.AddCommand("Archiving", false, "save xml2",
268 "save xml2", 268 "save xml2",
269 "Save a region's data in XML2 format", SaveXml2); 269 "Save a region's data in XML2 format", SaveXml2);
270 270
271 m_console.Commands.AddCommand("region", false, "load xml", 271 m_console.Commands.AddCommand("Archiving", false, "load xml",
272 "load xml [-newIDs [<x> <y> <z>]]", 272 "load xml [-newIDs [<x> <y> <z>]]",
273 "Load a region's data from XML format", LoadXml); 273 "Load a region's data from XML format", LoadXml);
274 274
275 m_console.Commands.AddCommand("region", false, "load xml2", 275 m_console.Commands.AddCommand("Archiving", false, "load xml2",
276 "load xml2", 276 "load xml2",
277 "Load a region's data from XML2 format", LoadXml2); 277 "Load a region's data from XML2 format", LoadXml2);
278 278
279 m_console.Commands.AddCommand("region", false, "save prims xml2", 279 m_console.Commands.AddCommand("Archiving", false, "save prims xml2",
280 "save prims xml2 [<prim name> <file name>]", 280 "save prims xml2 [<prim name> <file name>]",
281 "Save named prim to XML2", SavePrimsXml2); 281 "Save named prim to XML2", SavePrimsXml2);
282 282
283 m_console.Commands.AddCommand("region", false, "load oar", 283 m_console.Commands.AddCommand("Archiving", false, "load oar",
284 "load oar [--merge] [--skip-assets] [<OAR path>]", 284 "load oar [--merge] [--skip-assets] [<OAR path>]",
285 "Load a region's data from an OAR archive.", 285 "Load a region's data from an OAR archive.",
286 "--merge will merge the OAR with the existing scene." + Environment.NewLine 286 "--merge will merge the OAR with the existing scene." + Environment.NewLine
@@ -289,7 +289,7 @@ namespace OpenSim
289 + " If this is not given then the command looks for an OAR named region.oar in the current directory.", 289 + " If this is not given then the command looks for an OAR named region.oar in the current directory.",
290 LoadOar); 290 LoadOar);
291 291
292 m_console.Commands.AddCommand("region", false, "save oar", 292 m_console.Commands.AddCommand("Archiving", false, "save oar",
293 //"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]", 293 //"save oar [-v|--version=<N>] [-p|--profile=<url>] [<OAR path>]",
294 "save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]", 294 "save oar [-h|--home=<url>] [--noassets] [--publish] [--perm=<permissions>] [<OAR path>]",
295 "Save a region's data to an OAR archive.", 295 "Save a region's data to an OAR archive.",
@@ -306,54 +306,54 @@ namespace OpenSim
306 + " If this is not given then the oar is saved to region.oar in the current directory.", 306 + " If this is not given then the oar is saved to region.oar in the current directory.",
307 SaveOar); 307 SaveOar);
308 308
309 m_console.Commands.AddCommand("region", false, "edit scale", 309 m_console.Commands.AddCommand("Regions", false, "edit scale",
310 "edit scale <name> <x> <y> <z>", 310 "edit scale <name> <x> <y> <z>",
311 "Change the scale of a named prim", HandleEditScale); 311 "Change the scale of a named prim", HandleEditScale);
312 312
313 m_console.Commands.AddCommand("region", false, "kick user", 313 m_console.Commands.AddCommand("Users", false, "kick user",
314 "kick user <first> <last> [message]", 314 "kick user <first> <last> [message]",
315 "Kick a user off the simulator", KickUserCommand); 315 "Kick a user off the simulator", KickUserCommand);
316 316
317 m_console.Commands.AddCommand("region", false, "show users", 317 m_console.Commands.AddCommand("Users", false, "show users",
318 "show users [full]", 318 "show users [full]",
319 "Show user data for users currently on the region", 319 "Show user data for users currently on the region",
320 "Without the 'full' option, only users actually on the region are shown." 320 "Without the 'full' option, only users actually on the region are shown."
321 + " With the 'full' option child agents of users in neighbouring regions are also shown.", 321 + " With the 'full' option child agents of users in neighbouring regions are also shown.",
322 HandleShow); 322 HandleShow);
323 323
324 m_console.Commands.AddCommand("region", false, "show connections", 324 m_console.Commands.AddCommand("Comms", false, "show connections",
325 "show connections", 325 "show connections",
326 "Show connection data", HandleShow); 326 "Show connection data", HandleShow);
327 327
328 m_console.Commands.AddCommand("region", false, "show circuits", 328 m_console.Commands.AddCommand("Comms", false, "show circuits",
329 "show circuits", 329 "show circuits",
330 "Show agent circuit data", HandleShow); 330 "Show agent circuit data", HandleShow);
331 331
332 m_console.Commands.AddCommand("region", false, "show http-handlers", 332 m_console.Commands.AddCommand("Comms", false, "show http-handlers",
333 "show http-handlers", 333 "show http-handlers",
334 "Show all registered http handlers", HandleShow); 334 "Show all registered http handlers", HandleShow);
335 335
336 m_console.Commands.AddCommand("region", false, "show pending-objects", 336 m_console.Commands.AddCommand("Comms", false, "show pending-objects",
337 "show pending-objects", 337 "show pending-objects",
338 "Show # of objects on the pending queues of all scene viewers", HandleShow); 338 "Show # of objects on the pending queues of all scene viewers", HandleShow);
339 339
340 m_console.Commands.AddCommand("region", false, "show modules", 340 m_console.Commands.AddCommand("General", false, "show modules",
341 "show modules", 341 "show modules",
342 "Show module data", HandleShow); 342 "Show module data", HandleShow);
343 343
344 m_console.Commands.AddCommand("region", false, "show regions", 344 m_console.Commands.AddCommand("Regions", false, "show regions",
345 "show regions", 345 "show regions",
346 "Show region data", HandleShow); 346 "Show region data", HandleShow);
347 347
348 m_console.Commands.AddCommand("region", false, "show ratings", 348 m_console.Commands.AddCommand("Regions", false, "show ratings",
349 "show ratings", 349 "show ratings",
350 "Show rating data", HandleShow); 350 "Show rating data", HandleShow);
351 351
352 m_console.Commands.AddCommand("region", false, "backup", 352 m_console.Commands.AddCommand("Regions", false, "backup",
353 "backup", 353 "backup",
354 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand); 354 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand);
355 355
356 m_console.Commands.AddCommand("region", false, "create region", 356 m_console.Commands.AddCommand("Regions", false, "create region",
357 "create region [\"region name\"] <region_file.ini>", 357 "create region [\"region name\"] <region_file.ini>",
358 "Create a new region.", 358 "Create a new region.",
359 "The settings for \"region name\" are read from <region_file.ini>. Paths specified with <region_file.ini> are relative to your Regions directory, unless an absolute path is given." 359 "The settings for \"region name\" are read from <region_file.ini>. Paths specified with <region_file.ini> are relative to your Regions directory, unless an absolute path is given."
@@ -362,62 +362,57 @@ namespace OpenSim
362 + "If <region_file.ini> does not exist, it will be created.", 362 + "If <region_file.ini> does not exist, it will be created.",
363 HandleCreateRegion); 363 HandleCreateRegion);
364 364
365 m_console.Commands.AddCommand("region", false, "restart", 365 m_console.Commands.AddCommand("Regions", false, "restart",
366 "restart", 366 "restart",
367 "Restart all sims in this instance", RunCommand); 367 "Restart all sims in this instance", RunCommand);
368 368
369 m_console.Commands.AddCommand("region", false, "config set", 369 m_console.Commands.AddCommand("General", false, "config set",
370 "config set <section> <key> <value>", 370 "config set <section> <key> <value>",
371 "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); 371 "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig);
372 372
373 m_console.Commands.AddCommand("region", false, "config get", 373 m_console.Commands.AddCommand("General", false, "config get",
374 "config get [<section>] [<key>]", 374 "config get [<section>] [<key>]",
375 "Synonym for config show", 375 "Synonym for config show",
376 HandleConfig); 376 HandleConfig);
377 377
378 m_console.Commands.AddCommand("region", false, "config show", 378 m_console.Commands.AddCommand("General", false, "config show",
379 "config show [<section>] [<key>]", 379 "config show [<section>] [<key>]",
380 "Show config information", 380 "Show config information",
381 "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine 381 "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine
382 + "If a section is given but not a field, then all fields in that section are printed.", 382 + "If a section is given but not a field, then all fields in that section are printed.",
383 HandleConfig); 383 HandleConfig);
384 384
385 m_console.Commands.AddCommand("region", false, "config save", 385 m_console.Commands.AddCommand("General", false, "config save",
386 "config save <path>", 386 "config save <path>",
387 "Save current configuration to a file at the given path", HandleConfig); 387 "Save current configuration to a file at the given path", HandleConfig);
388 388
389 m_console.Commands.AddCommand("region", false, "command-script", 389 m_console.Commands.AddCommand("General", false, "command-script",
390 "command-script <script>", 390 "command-script <script>",
391 "Run a command script from file", RunCommand); 391 "Run a command script from file", RunCommand);
392 392
393 m_console.Commands.AddCommand("region", false, "remove-region", 393 m_console.Commands.AddCommand("Regions", false, "remove-region",
394 "remove-region <name>", 394 "remove-region <name>",
395 "Remove a region from this simulator", RunCommand); 395 "Remove a region from this simulator", RunCommand);
396 396
397 m_console.Commands.AddCommand("region", false, "delete-region", 397 m_console.Commands.AddCommand("Regions", false, "delete-region",
398 "delete-region <name>", 398 "delete-region <name>",
399 "Delete a region from disk", RunCommand); 399 "Delete a region from disk", RunCommand);
400 400
401 m_console.Commands.AddCommand("region", false, "modules list", 401 m_console.Commands.AddCommand("General", false, "modules list",
402 "modules list", 402 "modules list",
403 "List modules", HandleModules); 403 "List modules", HandleModules);
404 404
405 m_console.Commands.AddCommand("region", false, "modules load", 405 m_console.Commands.AddCommand("General", false, "modules load",
406 "modules load <name>", 406 "modules load <name>",
407 "Load a module", HandleModules); 407 "Load a module", HandleModules);
408 408
409 m_console.Commands.AddCommand("region", false, "modules unload", 409 m_console.Commands.AddCommand("General", false, "modules unload",
410 "modules unload <name>", 410 "modules unload <name>",
411 "Unload a module", HandleModules); 411 "Unload a module", HandleModules);
412 412
413 m_console.Commands.AddCommand("region", false, "Add-InventoryHost", 413 m_console.Commands.AddCommand("Regions", false, "kill uuid",
414 "Add-InventoryHost <host>",
415 String.Empty, RunCommand);
416
417 m_console.Commands.AddCommand("region", false, "kill uuid",
418 "kill uuid <UUID>", 414 "kill uuid <UUID>",
419 "Kill an object by UUID", KillUUID); 415 "Kill an object by UUID", KillUUID);
420
421 } 416 }
422 417
423 public override void ShutdownSpecific() 418 public override void ShutdownSpecific()
@@ -829,14 +824,6 @@ namespace OpenSim
829 case "restart": 824 case "restart":
830 m_sceneManager.RestartCurrentScene(); 825 m_sceneManager.RestartCurrentScene();
831 break; 826 break;
832
833 case "Add-InventoryHost":
834 if (cmdparams.Length > 0)
835 {
836 MainConsole.Instance.Output("Not implemented.");
837 }
838 break;
839
840 } 827 }
841 } 828 }
842 829