diff options
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 95 |
1 files changed, 94 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index aeb6f57..390cfcd 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -146,6 +146,9 @@ namespace OpenSim | |||
146 | ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); | 146 | ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); |
147 | } | 147 | } |
148 | 148 | ||
149 | /// <summary> | ||
150 | /// Register standard set of region console commands | ||
151 | /// </summary> | ||
149 | private void RegisterConsoleCommands() | 152 | private void RegisterConsoleCommands() |
150 | { | 153 | { |
151 | m_console.Commands.AddCommand("region", false, "clear assets", | 154 | m_console.Commands.AddCommand("region", false, "clear assets", |
@@ -332,6 +335,11 @@ namespace OpenSim | |||
332 | base.ShutdownSpecific(); | 335 | base.ShutdownSpecific(); |
333 | } | 336 | } |
334 | 337 | ||
338 | /// <summary> | ||
339 | /// Timer to run a specific text file as console commands. Configured in in the main ini file | ||
340 | /// </summary> | ||
341 | /// <param name="sender"></param> | ||
342 | /// <param name="e"></param> | ||
335 | private void RunAutoTimerScript(object sender, EventArgs e) | 343 | private void RunAutoTimerScript(object sender, EventArgs e) |
336 | { | 344 | { |
337 | if (m_timedScript != "disabled") | 345 | if (m_timedScript != "disabled") |
@@ -342,6 +350,11 @@ namespace OpenSim | |||
342 | 350 | ||
343 | #region Console Commands | 351 | #region Console Commands |
344 | 352 | ||
353 | /// <summary> | ||
354 | /// Kicks users off the region | ||
355 | /// </summary> | ||
356 | /// <param name="module"></param> | ||
357 | /// <param name="cmdparams">name of avatar to kick</param> | ||
345 | private void KickUserCommand(string module, string[] cmdparams) | 358 | private void KickUserCommand(string module, string[] cmdparams) |
346 | { | 359 | { |
347 | if (cmdparams.Length < 4) | 360 | if (cmdparams.Length < 4) |
@@ -401,6 +414,10 @@ namespace OpenSim | |||
401 | } | 414 | } |
402 | } | 415 | } |
403 | 416 | ||
417 | /// <summary> | ||
418 | /// Opens a file and uses it as input to the console command parser. | ||
419 | /// </summary> | ||
420 | /// <param name="fileName">name of file to use as input to the console</param> | ||
404 | private static void PrintFileToConsole(string fileName) | 421 | private static void PrintFileToConsole(string fileName) |
405 | { | 422 | { |
406 | if (File.Exists(fileName)) | 423 | if (File.Exists(fileName)) |
@@ -419,12 +436,22 @@ namespace OpenSim | |||
419 | m_log.Info("Not implemented."); | 436 | m_log.Info("Not implemented."); |
420 | } | 437 | } |
421 | 438 | ||
439 | /// <summary> | ||
440 | /// Force resending of all updates to all clients in active region(s) | ||
441 | /// </summary> | ||
442 | /// <param name="module"></param> | ||
443 | /// <param name="args"></param> | ||
422 | private void HandleForceUpdate(string module, string[] args) | 444 | private void HandleForceUpdate(string module, string[] args) |
423 | { | 445 | { |
424 | m_log.Info("Updating all clients"); | 446 | m_log.Info("Updating all clients"); |
425 | m_sceneManager.ForceCurrentSceneClientUpdate(); | 447 | m_sceneManager.ForceCurrentSceneClientUpdate(); |
426 | } | 448 | } |
427 | 449 | ||
450 | /// <summary> | ||
451 | /// Edits the scale of a primative with the name specified | ||
452 | /// </summary> | ||
453 | /// <param name="module"></param> | ||
454 | /// <param name="args">0,1, name, x, y, z</param> | ||
428 | private void HandleEditScale(string module, string[] args) | 455 | private void HandleEditScale(string module, string[] args) |
429 | { | 456 | { |
430 | if (args.Length == 6) | 457 | if (args.Length == 6) |
@@ -437,6 +464,11 @@ namespace OpenSim | |||
437 | } | 464 | } |
438 | } | 465 | } |
439 | 466 | ||
467 | /// <summary> | ||
468 | /// Creates a new region based on the parameters specified. This will ask the user questions on the console | ||
469 | /// </summary> | ||
470 | /// <param name="module"></param> | ||
471 | /// <param name="cmd">0,1,region name, region XML file</param> | ||
440 | private void HandleCreateRegion(string module, string[] cmd) | 472 | private void HandleCreateRegion(string module, string[] cmd) |
441 | { | 473 | { |
442 | if (cmd.Length < 4) | 474 | if (cmd.Length < 4) |
@@ -473,16 +505,32 @@ namespace OpenSim | |||
473 | } | 505 | } |
474 | } | 506 | } |
475 | 507 | ||
508 | /// <summary> | ||
509 | /// Enable logins | ||
510 | /// </summary> | ||
511 | /// <param name="module"></param> | ||
512 | /// <param name="cmd"></param> | ||
476 | private void HandleLoginEnable(string module, string[] cmd) | 513 | private void HandleLoginEnable(string module, string[] cmd) |
477 | { | 514 | { |
478 | ProcessLogin(true); | 515 | ProcessLogin(true); |
479 | } | 516 | } |
480 | 517 | ||
518 | |||
519 | /// <summary> | ||
520 | /// Disable logins | ||
521 | /// </summary> | ||
522 | /// <param name="module"></param> | ||
523 | /// <param name="cmd"></param> | ||
481 | private void HandleLoginDisable(string module, string[] cmd) | 524 | private void HandleLoginDisable(string module, string[] cmd) |
482 | { | 525 | { |
483 | ProcessLogin(false); | 526 | ProcessLogin(false); |
484 | } | 527 | } |
485 | 528 | ||
529 | /// <summary> | ||
530 | /// Log login status to the console | ||
531 | /// </summary> | ||
532 | /// <param name="module"></param> | ||
533 | /// <param name="cmd"></param> | ||
486 | private void HandleLoginStatus(string module, string[] cmd) | 534 | private void HandleLoginStatus(string module, string[] cmd) |
487 | { | 535 | { |
488 | if (m_commsManager.GridService.RegionLoginsEnabled == false) | 536 | if (m_commsManager.GridService.RegionLoginsEnabled == false) |
@@ -492,6 +540,12 @@ namespace OpenSim | |||
492 | m_log.Info("[ Login ] Login are enabled"); | 540 | m_log.Info("[ Login ] Login are enabled"); |
493 | } | 541 | } |
494 | 542 | ||
543 | |||
544 | /// <summary> | ||
545 | /// Change and load configuration file data. | ||
546 | /// </summary> | ||
547 | /// <param name="module"></param> | ||
548 | /// <param name="cmd"></param> | ||
495 | private void HandleConfig(string module, string[] cmd) | 549 | private void HandleConfig(string module, string[] cmd) |
496 | { | 550 | { |
497 | List<string> args = new List<string>(cmd); | 551 | List<string> args = new List<string>(cmd); |
@@ -557,6 +611,12 @@ namespace OpenSim | |||
557 | } | 611 | } |
558 | } | 612 | } |
559 | 613 | ||
614 | |||
615 | /// <summary> | ||
616 | /// Load, Unload, and list Region modules in use | ||
617 | /// </summary> | ||
618 | /// <param name="module"></param> | ||
619 | /// <param name="cmd"></param> | ||
560 | private void HandleModules(string module, string[] cmd) | 620 | private void HandleModules(string module, string[] cmd) |
561 | { | 621 | { |
562 | List<string> args = new List<string>(cmd); | 622 | List<string> args = new List<string>(cmd); |
@@ -797,6 +857,11 @@ namespace OpenSim | |||
797 | } | 857 | } |
798 | 858 | ||
799 | // see BaseOpenSimServer | 859 | // see BaseOpenSimServer |
860 | /// <summary> | ||
861 | /// Many commands list objects for debugging. Some of the types are listed here | ||
862 | /// </summary> | ||
863 | /// <param name="mod"></param> | ||
864 | /// <param name="cmd"></param> | ||
800 | public override void HandleShow(string mod, string[] cmd) | 865 | public override void HandleShow(string mod, string[] cmd) |
801 | { | 866 | { |
802 | base.HandleShow(mod, cmd); | 867 | base.HandleShow(mod, cmd); |
@@ -902,6 +967,10 @@ namespace OpenSim | |||
902 | } | 967 | } |
903 | } | 968 | } |
904 | 969 | ||
970 | /// <summary> | ||
971 | /// print UDP Queue data for each client | ||
972 | /// </summary> | ||
973 | /// <returns></returns> | ||
905 | private string GetQueuesReport() | 974 | private string GetQueuesReport() |
906 | { | 975 | { |
907 | string report = String.Empty; | 976 | string report = String.Empty; |
@@ -1010,6 +1079,11 @@ namespace OpenSim | |||
1010 | m_commsManager.UserAdminService.ResetUserPassword(firstName, lastName, newPassword); | 1079 | m_commsManager.UserAdminService.ResetUserPassword(firstName, lastName, newPassword); |
1011 | } | 1080 | } |
1012 | 1081 | ||
1082 | /// <summary> | ||
1083 | /// Use XML2 format to serialize data to a file | ||
1084 | /// </summary> | ||
1085 | /// <param name="module"></param> | ||
1086 | /// <param name="cmdparams"></param> | ||
1013 | protected void SavePrimsXml2(string module, string[] cmdparams) | 1087 | protected void SavePrimsXml2(string module, string[] cmdparams) |
1014 | { | 1088 | { |
1015 | if (cmdparams.Length > 5) | 1089 | if (cmdparams.Length > 5) |
@@ -1022,6 +1096,11 @@ namespace OpenSim | |||
1022 | } | 1096 | } |
1023 | } | 1097 | } |
1024 | 1098 | ||
1099 | /// <summary> | ||
1100 | /// Use XML format to serialize data to a file | ||
1101 | /// </summary> | ||
1102 | /// <param name="module"></param> | ||
1103 | /// <param name="cmdparams"></param> | ||
1025 | protected void SaveXml(string module, string[] cmdparams) | 1104 | protected void SaveXml(string module, string[] cmdparams) |
1026 | { | 1105 | { |
1027 | m_log.Error("[CONSOLE]: PLEASE NOTE, save-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use save-xml2, please file a mantis detailing the reason."); | 1106 | m_log.Error("[CONSOLE]: PLEASE NOTE, save-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use save-xml2, please file a mantis detailing the reason."); |
@@ -1036,6 +1115,11 @@ namespace OpenSim | |||
1036 | } | 1115 | } |
1037 | } | 1116 | } |
1038 | 1117 | ||
1118 | /// <summary> | ||
1119 | /// Loads data and region objects from XML format. | ||
1120 | /// </summary> | ||
1121 | /// <param name="module"></param> | ||
1122 | /// <param name="cmdparams"></param> | ||
1039 | protected void LoadXml(string module, string[] cmdparams) | 1123 | protected void LoadXml(string module, string[] cmdparams) |
1040 | { | 1124 | { |
1041 | m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason."); | 1125 | m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason."); |
@@ -1079,7 +1163,11 @@ namespace OpenSim | |||
1079 | } | 1163 | } |
1080 | } | 1164 | } |
1081 | } | 1165 | } |
1082 | 1166 | /// <summary> | |
1167 | /// Serialize region data to XML2Format | ||
1168 | /// </summary> | ||
1169 | /// <param name="module"></param> | ||
1170 | /// <param name="cmdparams"></param> | ||
1083 | protected void SaveXml2(string module, string[] cmdparams) | 1171 | protected void SaveXml2(string module, string[] cmdparams) |
1084 | { | 1172 | { |
1085 | if (cmdparams.Length > 2) | 1173 | if (cmdparams.Length > 2) |
@@ -1092,6 +1180,11 @@ namespace OpenSim | |||
1092 | } | 1180 | } |
1093 | } | 1181 | } |
1094 | 1182 | ||
1183 | /// <summary> | ||
1184 | /// Load region data from Xml2Format | ||
1185 | /// </summary> | ||
1186 | /// <param name="module"></param> | ||
1187 | /// <param name="cmdparams"></param> | ||
1095 | protected void LoadXml2(string module, string[] cmdparams) | 1188 | protected void LoadXml2(string module, string[] cmdparams) |
1096 | { | 1189 | { |
1097 | if (cmdparams.Length > 2) | 1190 | if (cmdparams.Length > 2) |