diff options
author | Jeff Ames | 2008-08-18 00:39:10 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-18 00:39:10 +0000 |
commit | 6ef9d4da901a346c232458317cca6268da888e2e (patch) | |
tree | dd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Region/Application/OpenSim.cs | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.zip opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2 opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz |
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 4664b0b..cc2d993 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -90,8 +90,8 @@ namespace OpenSim | |||
90 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (m_sandbox ? "sandbox" : "grid")); | 90 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (m_sandbox ? "sandbox" : "grid")); |
91 | 91 | ||
92 | m_console = new ConsoleBase("Region", this); | 92 | m_console = new ConsoleBase("Region", this); |
93 | MainConsole.Instance = m_console; | 93 | MainConsole.Instance = m_console; |
94 | 94 | ||
95 | base.Startup(); | 95 | base.Startup(); |
96 | 96 | ||
97 | //Run Startup Commands | 97 | //Run Startup Commands |
@@ -116,9 +116,9 @@ namespace OpenSim | |||
116 | PrintFileToConsole("startuplogo.txt"); | 116 | PrintFileToConsole("startuplogo.txt"); |
117 | RegisterCmd("echoTest", RunEchoTest, "this echos your command args to see how they are parsed"); | 117 | RegisterCmd("echoTest", RunEchoTest, "this echos your command args to see how they are parsed"); |
118 | RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving"); | 118 | RegisterCmd("kickuser", KickUserCommand, "kickuser [first] [last] - attempts to log off a user from any region we are serving"); |
119 | 119 | ||
120 | // For now, start at the 'root' level by default | 120 | // For now, start at the 'root' level by default |
121 | ChangeSelectedRegion(new string[] {"root"}); | 121 | ChangeSelectedRegion(new string[] {"root"}); |
122 | } | 122 | } |
123 | 123 | ||
124 | private void RunAutoTimerScript(object sender, EventArgs e) | 124 | private void RunAutoTimerScript(object sender, EventArgs e) |
@@ -135,7 +135,7 @@ namespace OpenSim | |||
135 | { | 135 | { |
136 | for (int i = 0; i < cmdparams.Length; i++) | 136 | for (int i = 0; i < cmdparams.Length; i++) |
137 | { | 137 | { |
138 | m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">"); | 138 | m_log.Info("[EchoTest]: <arg" + i + ">"+cmdparams[i]+"</arg" + i + ">"); |
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
@@ -214,7 +214,7 @@ namespace OpenSim | |||
214 | { | 214 | { |
215 | base.RunCmd(command, cmdparams); | 215 | base.RunCmd(command, cmdparams); |
216 | RunPluginCommands(command , cmdparams); | 216 | RunPluginCommands(command , cmdparams); |
217 | 217 | ||
218 | switch (command) | 218 | switch (command) |
219 | { | 219 | { |
220 | case "clear-assets": | 220 | case "clear-assets": |
@@ -255,7 +255,7 @@ namespace OpenSim | |||
255 | m_console.Notice(" debug scene [scripting] [collision] [physics] - Enable/Disable debug stuff, each can be True/False"); | 255 | m_console.Notice(" debug scene [scripting] [collision] [physics] - Enable/Disable debug stuff, each can be True/False"); |
256 | m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); | 256 | m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); |
257 | m_console.Notice("export-map [filename] - save image of world map"); | 257 | m_console.Notice("export-map [filename] - save image of world map"); |
258 | m_console.Notice("force-update - force an update of prims in the scene"); | 258 | m_console.Notice("force-update - force an update of prims in the scene"); |
259 | m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); | 259 | m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); |
260 | m_console.Notice("remove-region [name] - remove a region"); | 260 | m_console.Notice("remove-region [name] - remove a region"); |
261 | m_console.Notice("load-xml [filename] - load prims from XML (DEPRECATED)"); | 261 | m_console.Notice("load-xml [filename] - load prims from XML (DEPRECATED)"); |
@@ -273,14 +273,14 @@ namespace OpenSim | |||
273 | m_console.Notice("config set section field value - set a config value"); | 273 | m_console.Notice("config set section field value - set a config value"); |
274 | m_console.Notice("config get section field - get a config value"); | 274 | m_console.Notice("config get section field - get a config value"); |
275 | m_console.Notice("config save - save OpenSim.ini"); | 275 | m_console.Notice("config save - save OpenSim.ini"); |
276 | m_console.Notice("terrain help - show help for terrain commands."); | 276 | m_console.Notice("terrain help - show help for terrain commands."); |
277 | ShowPluginCommandsHelp(CombineParams(cmdparams, 0), m_console); | 277 | ShowPluginCommandsHelp(CombineParams(cmdparams, 0), m_console); |
278 | 278 | ||
279 | if (m_sandbox) | 279 | if (m_sandbox) |
280 | { | 280 | { |
281 | m_console.Notice(""); | 281 | m_console.Notice(""); |
282 | m_console.Notice("create user - adds a new user."); | 282 | m_console.Notice("create user - adds a new user."); |
283 | } | 283 | } |
284 | 284 | ||
285 | break; | 285 | break; |
286 | 286 | ||
@@ -314,11 +314,11 @@ namespace OpenSim | |||
314 | case "load-oar": | 314 | case "load-oar": |
315 | LoadOar(cmdparams); | 315 | LoadOar(cmdparams); |
316 | break; | 316 | break; |
317 | 317 | ||
318 | case "save-oar": | 318 | case "save-oar": |
319 | SaveOar(cmdparams); | 319 | SaveOar(cmdparams); |
320 | break; | 320 | break; |
321 | 321 | ||
322 | case "save-inv": | 322 | case "save-inv": |
323 | SaveInv(cmdparams); | 323 | SaveInv(cmdparams); |
324 | break; | 324 | break; |
@@ -343,13 +343,13 @@ namespace OpenSim | |||
343 | break; | 343 | break; |
344 | 344 | ||
345 | case "create": | 345 | case "create": |
346 | Create(cmdparams); | 346 | Create(cmdparams); |
347 | break; | 347 | break; |
348 | 348 | ||
349 | case "create-region": | 349 | case "create-region": |
350 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true); | 350 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1],false), true); |
351 | break; | 351 | break; |
352 | 352 | ||
353 | case "remove-region": | 353 | case "remove-region": |
354 | string regName = CombineParams(cmdparams, 0); | 354 | string regName = CombineParams(cmdparams, 0); |
355 | 355 | ||
@@ -441,7 +441,7 @@ namespace OpenSim | |||
441 | } | 441 | } |
442 | } | 442 | } |
443 | break; | 443 | break; |
444 | 444 | ||
445 | case "modules": | 445 | case "modules": |
446 | if (cmdparams.Length > 0) | 446 | if (cmdparams.Length > 0) |
447 | { | 447 | { |
@@ -488,7 +488,7 @@ namespace OpenSim | |||
488 | m_commsManager.AddInventoryService(cmdparams[0]); | 488 | m_commsManager.AddInventoryService(cmdparams[0]); |
489 | } | 489 | } |
490 | break; | 490 | break; |
491 | 491 | ||
492 | default: | 492 | default: |
493 | string[] tmpPluginArgs = new string[cmdparams.Length + 1]; | 493 | string[] tmpPluginArgs = new string[cmdparams.Length + 1]; |
494 | cmdparams.CopyTo(tmpPluginArgs, 1); | 494 | cmdparams.CopyTo(tmpPluginArgs, 1); |
@@ -498,7 +498,7 @@ namespace OpenSim | |||
498 | break; | 498 | break; |
499 | } | 499 | } |
500 | } | 500 | } |
501 | 501 | ||
502 | /// <summary> | 502 | /// <summary> |
503 | /// Change the currently selected region. The selected region is that operated upon by single region commands. | 503 | /// Change the currently selected region. The selected region is that operated upon by single region commands. |
504 | /// </summary> | 504 | /// </summary> |
@@ -515,13 +515,13 @@ namespace OpenSim | |||
515 | else | 515 | else |
516 | { | 516 | { |
517 | m_console.Error("Usage: change-region <region name>"); | 517 | m_console.Error("Usage: change-region <region name>"); |
518 | } | 518 | } |
519 | 519 | ||
520 | string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); | 520 | string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); |
521 | m_console.Notice(String.Format("Currently selected region is {0}", regionName)); | 521 | m_console.Notice(String.Format("Currently selected region is {0}", regionName)); |
522 | m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName); | 522 | m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName); |
523 | } | 523 | } |
524 | 524 | ||
525 | /// <summary> | 525 | /// <summary> |
526 | /// Execute switch for some of the create commands | 526 | /// Execute switch for some of the create commands |
527 | /// </summary> | 527 | /// </summary> |
@@ -530,7 +530,7 @@ namespace OpenSim | |||
530 | { | 530 | { |
531 | if (args.Length == 0) | 531 | if (args.Length == 0) |
532 | return; | 532 | return; |
533 | 533 | ||
534 | switch (args[0]) | 534 | switch (args[0]) |
535 | { | 535 | { |
536 | case "user": | 536 | case "user": |
@@ -547,7 +547,7 @@ namespace OpenSim | |||
547 | { | 547 | { |
548 | if (args.Length == 0) | 548 | if (args.Length == 0) |
549 | return; | 549 | return; |
550 | 550 | ||
551 | switch (args[0]) | 551 | switch (args[0]) |
552 | { | 552 | { |
553 | case "packet": | 553 | case "packet": |
@@ -566,7 +566,7 @@ namespace OpenSim | |||
566 | } | 566 | } |
567 | 567 | ||
568 | break; | 568 | break; |
569 | 569 | ||
570 | case "scene": | 570 | case "scene": |
571 | if (args.Length == 4) | 571 | if (args.Length == 4) |
572 | { | 572 | { |
@@ -580,11 +580,11 @@ namespace OpenSim | |||
580 | bool collisionsOn = !Convert.ToBoolean(args[2]); | 580 | bool collisionsOn = !Convert.ToBoolean(args[2]); |
581 | bool physicsOn = !Convert.ToBoolean(args[3]); | 581 | bool physicsOn = !Convert.ToBoolean(args[3]); |
582 | m_sceneManager.CurrentScene.SetSceneCoreDebug(scriptingOn, collisionsOn, physicsOn); | 582 | m_sceneManager.CurrentScene.SetSceneCoreDebug(scriptingOn, collisionsOn, physicsOn); |
583 | 583 | ||
584 | m_console.Notice( | 584 | m_console.Notice( |
585 | "CONSOLE", | 585 | "CONSOLE", |
586 | String.Format( | 586 | String.Format( |
587 | "Set debug scene scripting = {0}, collisions = {1}, physics = {2}", | 587 | "Set debug scene scripting = {0}, collisions = {1}, physics = {2}", |
588 | !scriptingOn, !collisionsOn, !physicsOn)); | 588 | !scriptingOn, !collisionsOn, !physicsOn)); |
589 | } | 589 | } |
590 | } | 590 | } |
@@ -592,9 +592,9 @@ namespace OpenSim | |||
592 | { | 592 | { |
593 | m_console.Error("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)"); | 593 | m_console.Error("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)"); |
594 | } | 594 | } |
595 | 595 | ||
596 | break; | 596 | break; |
597 | 597 | ||
598 | default: | 598 | default: |
599 | m_console.Error("Unknown debug"); | 599 | m_console.Error("Unknown debug"); |
600 | break; | 600 | break; |
@@ -666,7 +666,7 @@ namespace OpenSim | |||
666 | break; | 666 | break; |
667 | } | 667 | } |
668 | } | 668 | } |
669 | 669 | ||
670 | /// <summary> | 670 | /// <summary> |
671 | /// Create a new user | 671 | /// Create a new user |
672 | /// </summary> | 672 | /// </summary> |
@@ -697,7 +697,7 @@ namespace OpenSim | |||
697 | 697 | ||
698 | if ( cmdparams.Length < 6 ) | 698 | if ( cmdparams.Length < 6 ) |
699 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); | 699 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); |
700 | else regY = Convert.ToUInt32(cmdparams[5]); | 700 | else regY = Convert.ToUInt32(cmdparams[5]); |
701 | 701 | ||
702 | if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName)) | 702 | if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName)) |
703 | { | 703 | { |
@@ -706,9 +706,9 @@ namespace OpenSim | |||
706 | else | 706 | else |
707 | { | 707 | { |
708 | m_log.ErrorFormat("[CONSOLE]: A user with the name {0} {1} already exists!", firstName, lastName); | 708 | m_log.ErrorFormat("[CONSOLE]: A user with the name {0} {1} already exists!", firstName, lastName); |
709 | } | 709 | } |
710 | } | 710 | } |
711 | 711 | ||
712 | protected void SaveXml(string[] cmdparams) | 712 | protected void SaveXml(string[] cmdparams) |
713 | { | 713 | { |
714 | 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."); | 714 | 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."); |
@@ -721,8 +721,8 @@ namespace OpenSim | |||
721 | { | 721 | { |
722 | m_sceneManager.SaveCurrentSceneToXml(DEFAULT_PRIM_BACKUP_FILENAME); | 722 | m_sceneManager.SaveCurrentSceneToXml(DEFAULT_PRIM_BACKUP_FILENAME); |
723 | } | 723 | } |
724 | } | 724 | } |
725 | 725 | ||
726 | protected void LoadXml(string[] cmdparams) | 726 | protected void LoadXml(string[] cmdparams) |
727 | { | 727 | { |
728 | 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."); | 728 | 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."); |
@@ -758,8 +758,8 @@ namespace OpenSim | |||
758 | { | 758 | { |
759 | m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false, loadOffset); | 759 | m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false, loadOffset); |
760 | } | 760 | } |
761 | } | 761 | } |
762 | 762 | ||
763 | protected void SaveXml2(string[] cmdparams) | 763 | protected void SaveXml2(string[] cmdparams) |
764 | { | 764 | { |
765 | if (cmdparams.Length > 0) | 765 | if (cmdparams.Length > 0) |
@@ -771,7 +771,7 @@ namespace OpenSim | |||
771 | m_sceneManager.SaveCurrentSceneToXml2(DEFAULT_PRIM_BACKUP_FILENAME); | 771 | m_sceneManager.SaveCurrentSceneToXml2(DEFAULT_PRIM_BACKUP_FILENAME); |
772 | } | 772 | } |
773 | } | 773 | } |
774 | 774 | ||
775 | protected void LoadXml2(string[] cmdparams) | 775 | protected void LoadXml2(string[] cmdparams) |
776 | { | 776 | { |
777 | if (cmdparams.Length > 0) | 777 | if (cmdparams.Length > 0) |
@@ -782,8 +782,8 @@ namespace OpenSim | |||
782 | { | 782 | { |
783 | m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME); | 783 | m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME); |
784 | } | 784 | } |
785 | } | 785 | } |
786 | 786 | ||
787 | /// <summary> | 787 | /// <summary> |
788 | /// Load a whole region from an opensim archive. | 788 | /// Load a whole region from an opensim archive. |
789 | /// </summary> | 789 | /// </summary> |
@@ -800,9 +800,9 @@ namespace OpenSim | |||
800 | else | 800 | else |
801 | { | 801 | { |
802 | m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME); | 802 | m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME); |
803 | } | 803 | } |
804 | } | 804 | } |
805 | 805 | ||
806 | /// <summary> | 806 | /// <summary> |
807 | /// Save a region to a file, including all the assets needed to restore it. | 807 | /// Save a region to a file, including all the assets needed to restore it. |
808 | /// </summary> | 808 | /// </summary> |
@@ -819,8 +819,8 @@ namespace OpenSim | |||
819 | else | 819 | else |
820 | { | 820 | { |
821 | m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME); | 821 | m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME); |
822 | } | 822 | } |
823 | } | 823 | } |
824 | 824 | ||
825 | private static string CombineParams(string[] commandParams, int pos) | 825 | private static string CombineParams(string[] commandParams, int pos) |
826 | { | 826 | { |
@@ -835,7 +835,7 @@ namespace OpenSim | |||
835 | 835 | ||
836 | /// <summary> | 836 | /// <summary> |
837 | /// Runs the best matching plugin command | 837 | /// Runs the best matching plugin command |
838 | /// | 838 | /// |
839 | /// returns true if a match was found, false otherwise. | 839 | /// returns true if a match was found, false otherwise. |
840 | /// </summary> | 840 | /// </summary> |
841 | public bool RunPluginCommands(string cmd, string[] withParams) | 841 | public bool RunPluginCommands(string cmd, string[] withParams) |