From bb4cb165127164cbc9d907aac27c4fb3eb69d443 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 2 Jul 2011 01:05:03 +0100
Subject: Add profile, merge, noassets and skip-assets options for
loading/saving oars via RemoteAdmin
This is http://opensimulator.org/mantis/view.php?id=5453
Thanks Michelle Argus!
---
.../RemoteController/RemoteAdminPlugin.cs | 41 ++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
(limited to 'OpenSim/ApplicationPlugins/RemoteController')
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 5a011ce..93a6915 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -2201,6 +2201,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// UUID of the region
/// - region_name
/// region name
+ /// - merge
+ /// true if oar should be merged
+ /// - skip-assets
+ /// true if assets should be skiped
///
///
/// region_uuid
takes precedence over
@@ -2259,10 +2263,22 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(String.Format("failed to switch to region {0}", region_name));
}
else throw new Exception("neither region_name nor region_uuid given");
+
+ bool mergeOar = false;
+ bool skipAssets = false;
+
+ if ((string)requestData["merge"] == "true")
+ {
+ mergeOar = true;
+ }
+ if ((string)requestData["skip-assets"] == "true")
+ {
+ skipAssets = true;
+ }
IRegionArchiverModule archiver = scene.RequestModuleInterface();
if (archiver != null)
- archiver.DearchiveRegion(filename);
+ archiver.DearchiveRegion(filename, mergeOar, skipAssets, Guid.Empty);
else
throw new Exception("Archiver module not present for scene");
@@ -2302,6 +2318,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// UUID of the region
/// - region_name
/// region name
+ /// - profile
+ /// profile url
+ /// - noassets
+ /// true if no assets should be saved
///
///
/// region_uuid
takes precedence over
@@ -2359,12 +2379,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
else throw new Exception("neither region_name nor region_uuid given");
+ Dictionary options = new Dictionary();
+
+ //if (requestData.Contains("version"))
+ //{
+ // options["version"] = (string)requestData["version"];
+ //}
+
+ if (requestData.Contains("profile"))
+ {
+ options["profile"] = (string)requestData["profile"];
+ }
+
+ if (requestData["noassets"] == "true")
+ {
+ options["noassets"] = (string)requestData["noassets"] ;
+ }
+
IRegionArchiverModule archiver = scene.RequestModuleInterface();
if (archiver != null)
{
scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
- archiver.ArchiveRegion(filename, new Dictionary());
+ archiver.ArchiveRegion(filename, options);
lock (m_saveOarLock) Monitor.Wait(m_saveOarLock,5000);
scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
}
--
cgit v1.1