Add ability to load IARs directly from URIs
So, something like load iar Justin Clark-Casey / PASSWORD http://justincc.org/downloads/iars/my-great-items.iar Will load my IAR directly from the web.soprefactor
parent
14c39461c2
commit
fff5459f4d
|
@ -182,8 +182,7 @@ namespace OpenSim.Framework.Console
|
||||||
public void AddCommand(string module, bool shared, string command,
|
public void AddCommand(string module, bool shared, string command,
|
||||||
string help, string longhelp, CommandDelegate fn)
|
string help, string longhelp, CommandDelegate fn)
|
||||||
{
|
{
|
||||||
AddCommand(module, shared, command, help, longhelp,
|
AddCommand(module, shared, command, help, longhelp, String.Empty, fn);
|
||||||
String.Empty, fn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -37,7 +37,6 @@ using log4net;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
|
|
||||||
using OpenSim.Framework.Communications.Osp;
|
using OpenSim.Framework.Communications.Osp;
|
||||||
using OpenSim.Framework.Serialization;
|
using OpenSim.Framework.Serialization;
|
||||||
using OpenSim.Framework.Serialization.External;
|
using OpenSim.Framework.Serialization.External;
|
||||||
|
@ -72,7 +71,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
scene,
|
scene,
|
||||||
userInfo,
|
userInfo,
|
||||||
invPath,
|
invPath,
|
||||||
new GZipStream(new FileStream(loadPath, FileMode.Open), CompressionMode.Decompress))
|
new GZipStream(ArchiveHelpers.GetStream(loadPath), CompressionMode.Decompress))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,13 +91,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
scene.AddCommand(
|
scene.AddCommand(
|
||||||
this, "load iar",
|
this, "load iar",
|
||||||
"load iar <first> <last> <inventory path> <password> [<archive path>]",
|
"load iar <first> <last> <inventory path> <password> [<IAR path>]",
|
||||||
"Load user inventory archive.", HandleLoadInvConsoleCommand);
|
"Load user inventory archive (IAR).",
|
||||||
|
"<first> is user's first name." + Environment.NewLine
|
||||||
|
+ "<last> is user's last name." + Environment.NewLine
|
||||||
|
+ "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine
|
||||||
|
+ "<password> is the user's password." + Environment.NewLine
|
||||||
|
+ "<IAR path> is the filesystem path or URI from which to load the IAR."
|
||||||
|
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
|
||||||
|
HandleLoadInvConsoleCommand);
|
||||||
|
|
||||||
scene.AddCommand(
|
scene.AddCommand(
|
||||||
this, "save iar",
|
this, "save iar",
|
||||||
"save iar <first> <last> <inventory path> <password> [<archive path>]",
|
"save iar <first> <last> <inventory path> <password> [<IAR path>]",
|
||||||
"Save user inventory archive.", HandleSaveInvConsoleCommand);
|
"Save user inventory archive (IAR).",
|
||||||
|
"<first> is the user's first name." + Environment.NewLine
|
||||||
|
+ "<last> is the user's last name." + Environment.NewLine
|
||||||
|
+ "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
|
||||||
|
+ "<IAR path> is the filesystem path at which to save the IAR."
|
||||||
|
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
|
||||||
|
HandleSaveInvConsoleCommand);
|
||||||
|
|
||||||
m_aScene = scene;
|
m_aScene = scene;
|
||||||
}
|
}
|
||||||
|
|
|
@ -498,7 +498,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Call this from a region module to add a command to the OpenSim console.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mod"></param>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <param name="shorthelp"></param>
|
||||||
|
/// <param name="longhelp"></param>
|
||||||
|
/// <param name="callback"></param>
|
||||||
public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback)
|
public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback)
|
||||||
|
{
|
||||||
|
AddCommand(mod, command, shorthelp, longhelp, string.Empty, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Call this from a region module to add a command to the OpenSim console.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mod"></param>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <param name="shorthelp"></param>
|
||||||
|
/// <param name="longhelp"></param>
|
||||||
|
/// <param name="descriptivehelp"></param>
|
||||||
|
/// <param name="callback"></param>
|
||||||
|
public void AddCommand(
|
||||||
|
object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback)
|
||||||
{
|
{
|
||||||
if (MainConsole.Instance == null)
|
if (MainConsole.Instance == null)
|
||||||
return;
|
return;
|
||||||
|
@ -523,7 +546,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase");
|
else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase");
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback);
|
MainConsole.Instance.Commands.AddCommand(
|
||||||
|
modulename, shared, command, shorthelp, longhelp, descriptivehelp, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual ISceneObject DeserializeObject(string representation)
|
public virtual ISceneObject DeserializeObject(string representation)
|
||||||
|
|
Loading…
Reference in New Issue