aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs47
1 files changed, 47 insertions, 0 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;
40using OpenSim.Framework.Statistics; 40using OpenSim.Framework.Statistics;
41using OpenSim.Region.Environment.Interfaces; 41using OpenSim.Region.Environment.Interfaces;
42using OpenSim.Region.Environment.Scenes; 42using OpenSim.Region.Environment.Scenes;
43using OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver;
43using Timer=System.Timers.Timer; 44using Timer=System.Timers.Timer;
44 45
45namespace OpenSim 46namespace 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;