aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs3
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs26
4 files changed, 44 insertions, 9 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 66f483c..2008613 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -182,8 +182,7 @@ namespace OpenSim.Framework.Console
182 public void AddCommand(string module, bool shared, string command, 182 public void AddCommand(string module, bool shared, string command,
183 string help, string longhelp, CommandDelegate fn) 183 string help, string longhelp, CommandDelegate fn)
184 { 184 {
185 AddCommand(module, shared, command, help, longhelp, 185 AddCommand(module, shared, command, help, longhelp, String.Empty, fn);
186 String.Empty, fn);
187 } 186 }
188 187
189 /// <summary> 188 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index dc7439c..806aa4f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -37,7 +37,6 @@ using log4net;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Communications; 39using OpenSim.Framework.Communications;
40
41using OpenSim.Framework.Communications.Osp; 40using OpenSim.Framework.Communications.Osp;
42using OpenSim.Framework.Serialization; 41using OpenSim.Framework.Serialization;
43using OpenSim.Framework.Serialization.External; 42using OpenSim.Framework.Serialization.External;
@@ -72,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
72 scene, 71 scene,
73 userInfo, 72 userInfo,
74 invPath, 73 invPath,
75 new GZipStream(new FileStream(loadPath, FileMode.Open), CompressionMode.Decompress)) 74 new GZipStream(ArchiveHelpers.GetStream(loadPath), CompressionMode.Decompress))
76 { 75 {
77 } 76 }
78 77
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index f570999..307db97 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -91,13 +91,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
91 91
92 scene.AddCommand( 92 scene.AddCommand(
93 this, "load iar", 93 this, "load iar",
94 "load iar <first> <last> <inventory path> <password> [<archive path>]", 94 "load iar <first> <last> <inventory path> <password> [<IAR path>]",
95 "Load user inventory archive.", HandleLoadInvConsoleCommand); 95 "Load user inventory archive (IAR).",
96 "<first> is user's first name." + Environment.NewLine
97 + "<last> is user's last name." + Environment.NewLine
98 + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine
99 + "<password> is the user's password." + Environment.NewLine
100 + "<IAR path> is the filesystem path or URI from which to load the IAR."
101 + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
102 HandleLoadInvConsoleCommand);
96 103
97 scene.AddCommand( 104 scene.AddCommand(
98 this, "save iar", 105 this, "save iar",
99 "save iar <first> <last> <inventory path> <password> [<archive path>]", 106 "save iar <first> <last> <inventory path> <password> [<IAR path>]",
100 "Save user inventory archive.", HandleSaveInvConsoleCommand); 107 "Save user inventory archive (IAR).",
108 "<first> is the user's first name." + Environment.NewLine
109 + "<last> is the user's last name." + Environment.NewLine
110 + "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
111 + "<IAR path> is the filesystem path at which to save the IAR."
112 + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
113 HandleSaveInvConsoleCommand);
101 114
102 m_aScene = scene; 115 m_aScene = scene;
103 } 116 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index bfc19b7..c363a91 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -498,8 +498,31 @@ namespace OpenSim.Region.Framework.Scenes
498 } 498 }
499 } 499 }
500 500
501 /// <summary>
502 /// Call this from a region module to add a command to the OpenSim console.
503 /// </summary>
504 /// <param name="mod"></param>
505 /// <param name="command"></param>
506 /// <param name="shorthelp"></param>
507 /// <param name="longhelp"></param>
508 /// <param name="callback"></param>
501 public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback) 509 public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback)
502 { 510 {
511 AddCommand(mod, command, shorthelp, longhelp, string.Empty, callback);
512 }
513
514 /// <summary>
515 /// Call this from a region module to add a command to the OpenSim console.
516 /// </summary>
517 /// <param name="mod"></param>
518 /// <param name="command"></param>
519 /// <param name="shorthelp"></param>
520 /// <param name="longhelp"></param>
521 /// <param name="descriptivehelp"></param>
522 /// <param name="callback"></param>
523 public void AddCommand(
524 object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback)
525 {
503 if (MainConsole.Instance == null) 526 if (MainConsole.Instance == null)
504 return; 527 return;
505 528
@@ -523,7 +546,8 @@ namespace OpenSim.Region.Framework.Scenes
523 else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase"); 546 else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase");
524 } 547 }
525 548
526 MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback); 549 MainConsole.Instance.Commands.AddCommand(
550 modulename, shared, command, shorthelp, longhelp, descriptivehelp, callback);
527 } 551 }
528 552
529 public virtual ISceneObject DeserializeObject(string representation) 553 public virtual ISceneObject DeserializeObject(string representation)