* move command line parsing code from inventory archive modules to opensim server

* use default inventory archive name if none is given
* other minor cleanups
* this facility is not useable yet
This commit is contained in:
Justin Clarke Casey
2008-10-19 17:51:42 +00:00
parent ed8a20dd60
commit f7205da1d9
3 changed files with 44 additions and 29 deletions

View File

@@ -686,7 +686,7 @@ namespace OpenSim
#endregion
/// <summary>
/// Save inventory to a file.
/// Save inventory to a file archive
/// </summary>
/// <param name="cmdparams"></param>
protected void SaveInv(string[] cmdparams)
@@ -697,11 +697,19 @@ namespace OpenSim
m_log.Error("[CONSOLE]: usage is save-inv <first name> <last name> <inventory path> [<save file path>]");
return;
}
new InventoryArchiveWriteRequest(m_sceneManager.CurrentOrFirstScene,m_commsManager).execute(cmdparams);
string firstName = cmdparams[0];
string lastName = cmdparams[1];
string invPath = cmdparams[2];
string savePath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
new InventoryArchiveWriteRequest(
m_sceneManager.CurrentOrFirstScene,m_commsManager).execute(
firstName, lastName, invPath, savePath);
}
/// <summary>
/// Load inventory from a tar.gz file.
/// Load inventory from an inventory file archive
/// </summary>
/// <param name="cmdparams"></param>
protected void LoadInv(string[] cmdparams)
@@ -712,7 +720,15 @@ namespace OpenSim
m_log.Error("[CONSOLE]: usage is load-inv <first name> <last name> <inventory path> [<load file path>]");
return;
}
new InventoryArchiveReadRequest(m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(cmdparams);
string firstName = cmdparams[0];
string lastName = cmdparams[1];
string invPath = cmdparams[2];
string loadPath = (cmdparams.Length > 3 ? cmdparams[3] : DEFAULT_INV_BACKUP_FILENAME);
new InventoryArchiveReadRequest(
m_sceneManager.CurrentOrFirstScene, m_commsManager).execute(
firstName, lastName, invPath, loadPath);
}
/// <summary>