diff options
author | Justin Clarke Casey | 2008-10-19 18:26:44 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-19 18:26:44 +0000 |
commit | 3b381523eb391867e8e66634919e257484610ac3 (patch) | |
tree | d69f8fd4b810f9f03b11cf7a9a244a573183f7cd | |
parent | * Restore loaded inventory items to the given folder (diff) | |
download | opensim-SC_OLD-3b381523eb391867e8e66634919e257484610ac3.zip opensim-SC_OLD-3b381523eb391867e8e66634919e257484610ac3.tar.gz opensim-SC_OLD-3b381523eb391867e8e66634919e257484610ac3.tar.bz2 opensim-SC_OLD-3b381523eb391867e8e66634919e257484610ac3.tar.xz |
* refactor: move loadInv and saveInv command line param functions up to the interactive OpenSim class
* direct module import is temporary
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 47 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 47 |
2 files changed, 47 insertions, 47 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 93d56bc..9d3bcda 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -40,6 +40,7 @@ using OpenSim.Framework.Console; | |||
40 | using OpenSim.Framework.Statistics; | 40 | using OpenSim.Framework.Statistics; |
41 | using OpenSim.Region.Environment.Interfaces; | 41 | using OpenSim.Region.Environment.Interfaces; |
42 | using OpenSim.Region.Environment.Scenes; | 42 | using OpenSim.Region.Environment.Scenes; |
43 | using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver; | ||
43 | using Timer=System.Timers.Timer; | 44 | using Timer=System.Timers.Timer; |
44 | 45 | ||
45 | namespace OpenSim | 46 | namespace OpenSim |
@@ -897,7 +898,53 @@ namespace OpenSim | |||
897 | m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME); | 898 | m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME); |
898 | } | 899 | } |
899 | } | 900 | } |
901 | |||
902 | /// <summary> | ||
903 | /// Load inventory from an inventory file archive | ||
904 | /// </summary> | ||
905 | /// <param name="cmdparams"></param> | ||
906 | protected void LoadInv(string[] cmdparams) | ||
907 | { | ||
908 | m_log.Error("[CONSOLE]: This command has not yet been implemented!"); | ||
909 | if (cmdparams.Length < 3) | ||
910 | { | ||
911 | m_log.Error("[CONSOLE]: usage is load-inv <first name> <last name> <inventory path> [<load file path>]"); | ||
912 | return; | ||
913 | } | ||
914 | |||
915 | string firstName = cmdparams[0]; | ||
916 | string lastName = cmdparams[1]; | ||
917 | string invPath = cmdparams[2]; | ||
918 | string loadPath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); | ||
919 | |||
920 | new InventoryArchiveReadRequest( | ||
921 | m_sceneManager.CurrentOrFirstScene, m_commsManager).execute( | ||
922 | firstName, lastName, invPath, loadPath); | ||
923 | } | ||
900 | 924 | ||
925 | /// <summary> | ||
926 | /// Save inventory to a file archive | ||
927 | /// </summary> | ||
928 | /// <param name="cmdparams"></param> | ||
929 | protected void SaveInv(string[] cmdparams) | ||
930 | { | ||
931 | m_log.Error("[CONSOLE]: This command has not yet been implemented!"); | ||
932 | if (cmdparams.Length < 3) | ||
933 | { | ||
934 | m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]"); | ||
935 | return; | ||
936 | } | ||
937 | |||
938 | string firstName = cmdparams[0]; | ||
939 | string lastName = cmdparams[1]; | ||
940 | string invPath = cmdparams[2]; | ||
941 | string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); | ||
942 | |||
943 | new InventoryArchiveWriteRequest( | ||
944 | m_sceneManager.CurrentOrFirstScene,m_commsManager).execute( | ||
945 | firstName, lastName, invPath, savePath); | ||
946 | } | ||
947 | |||
901 | private static string CombineParams(string[] commandParams, int pos) | 948 | private static string CombineParams(string[] commandParams, int pos) |
902 | { | 949 | { |
903 | string result = String.Empty; | 950 | string result = String.Empty; |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 69bb4d8..16cf5f3 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -48,7 +48,6 @@ using OpenSim.Region.Environment; | |||
48 | using OpenSim.Region.Environment.Interfaces; | 48 | using OpenSim.Region.Environment.Interfaces; |
49 | using OpenSim.Region.Environment.Scenes; | 49 | using OpenSim.Region.Environment.Scenes; |
50 | using OpenSim.Region.Physics.Manager; | 50 | using OpenSim.Region.Physics.Manager; |
51 | using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver; | ||
52 | 51 | ||
53 | namespace OpenSim | 52 | namespace OpenSim |
54 | { | 53 | { |
@@ -686,52 +685,6 @@ namespace OpenSim | |||
686 | #endregion | 685 | #endregion |
687 | 686 | ||
688 | /// <summary> | 687 | /// <summary> |
689 | /// Save inventory to a file archive | ||
690 | /// </summary> | ||
691 | /// <param name="cmdparams"></param> | ||
692 | protected void SaveInv(string[] cmdparams) | ||
693 | { | ||
694 | m_log.Error("[CONSOLE]: This command has not yet been implemented!"); | ||
695 | if (cmdparams.Length < 3) | ||
696 | { | ||
697 | m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]"); | ||
698 | return; | ||
699 | } | ||
700 | |||
701 | string firstName = cmdparams[0]; | ||
702 | string lastName = cmdparams[1]; | ||
703 | string invPath = cmdparams[2]; | ||
704 | string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); | ||
705 | |||
706 | new InventoryArchiveWriteRequest( | ||
707 | m_sceneManager.CurrentOrFirstScene,m_commsManager).execute( | ||
708 | firstName, lastName, invPath, savePath); | ||
709 | } | ||
710 | |||
711 | /// <summary> | ||
712 | /// Load inventory from an inventory file archive | ||
713 | /// </summary> | ||
714 | /// <param name="cmdparams"></param> | ||
715 | protected void LoadInv(string[] cmdparams) | ||
716 | { | ||
717 | m_log.Error("[CONSOLE]: This command has not yet been implemented!"); | ||
718 | if (cmdparams.Length < 3) | ||
719 | { | ||
720 | m_log.Error("[CONSOLE]: usage is load-inv <first name> <last name> <inventory path> [<load file path>]"); | ||
721 | return; | ||
722 | } | ||
723 | |||
724 | string firstName = cmdparams[0]; | ||
725 | string lastName = cmdparams[1]; | ||
726 | string invPath = cmdparams[2]; | ||
727 | string loadPath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME); | ||
728 | |||
729 | new InventoryArchiveReadRequest( | ||
730 | m_sceneManager.CurrentOrFirstScene, m_commsManager).execute( | ||
731 | firstName, lastName, invPath, loadPath); | ||
732 | } | ||
733 | |||
734 | /// <summary> | ||
735 | /// Performs any last-minute sanity checking and shuts down the region server | 688 | /// Performs any last-minute sanity checking and shuts down the region server |
736 | /// </summary> | 689 | /// </summary> |
737 | protected override void ShutdownSpecific() | 690 | protected override void ShutdownSpecific() |