From e9153e1d1aae50024d8cd05fe14a9bce34343a0e Mon Sep 17 00:00:00 2001
From: teravus
Date: Thu, 15 Nov 2012 10:05:16 -0500
Subject: Revert "Merge master into teravuswork", it should have been
avination, not master.
This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing
changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
---
.../RemoteController/RemoteAdminPlugin.cs | 91 +++++++++++++++++++---
1 file changed, 79 insertions(+), 12 deletions(-)
(limited to 'OpenSim/ApplicationPlugins/RemoteController')
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 9c933ee..437d150 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -696,7 +696,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
region.ExternalHostName = (string) requestData["external_address"];
- bool persist = Convert.ToBoolean(requestData["persist"]);
+ bool persist = Convert.ToBoolean((string) requestData["persist"]);
if (persist)
{
// default place for region configuration files is in the
@@ -852,6 +852,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = true;
responseData["region_name"] = region.RegionName;
responseData["region_id"] = region.RegionID.ToString();
+ responseData["region_uuid"] = region.RegionID.ToString(); //Deprecate July 2012
m_log.Info("[RADMIN]: CreateRegion: request complete");
}
@@ -1105,8 +1106,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
string lastName = (string) requestData["user_lastname"];
string password = (string) requestData["user_password"];
- uint regionXLocation = Convert.ToUInt32(requestData["start_region_x"]);
- uint regionYLocation = Convert.ToUInt32(requestData["start_region_y"]);
+ uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]);
+ uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]);
string email = ""; // empty string for email
if (requestData.Contains("user_email"))
@@ -1303,9 +1304,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"];
if (requestData.ContainsKey("start_region_x"))
- regionXLocation = Convert.ToUInt32(requestData["start_region_x"]);
+ regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]);
if (requestData.ContainsKey("start_region_y"))
- regionYLocation = Convert.ToUInt32(requestData["start_region_y"]);
+ regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]);
// if (requestData.ContainsKey("start_lookat_x"))
// ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]);
@@ -1492,8 +1493,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
/// profile url
/// - noassets
/// true if no assets should be saved
- /// - all
- /// true to save all the regions in the simulator
/// - perm
/// C and/or T
///
@@ -1550,11 +1549,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
options["checkPermissions"] = (string)requestData["perm"];
}
- if ((string)requestData["all"] == "true")
- {
- options["all"] = (string)requestData["all"];
- }
-
IRegionArchiverModule archiver = scene.RequestModuleInterface();
if (archiver != null)
@@ -2014,6 +2008,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
return;
}
+ #region Deprecate July 2012
+ //region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!!
+ else if (requestData.ContainsKey("regionid") &&
+ !String.IsNullOrEmpty((string)requestData["regionid"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
+ }
+ else if (requestData.ContainsKey("region_ID") &&
+ !String.IsNullOrEmpty((string)requestData["region_ID"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
+ }
+ else if (requestData.ContainsKey("regionID") &&
+ !String.IsNullOrEmpty((string)requestData["regionID"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
+ }
+ else if (requestData.ContainsKey("region_uuid") &&
+ !String.IsNullOrEmpty((string)requestData["region_uuid"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
+ }
+ #endregion
else
{
responseData["accepted"] = false;
@@ -2035,6 +2052,56 @@ namespace OpenSim.ApplicationPlugins.RemoteController
throw new Exception(String.Format("Region ID {0} not found", regionID));
}
}
+ #region Deprecate July 2012
+ else if (requestData.ContainsKey("regionid") &&
+ !String.IsNullOrEmpty((string)requestData["regionid"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
+
+ UUID regionID = (UUID)(string)requestData["regionid"];
+ if (!m_application.SceneManager.TryGetScene(regionID, out scene))
+ {
+ responseData["error"] = String.Format("Region ID {0} not found", regionID);
+ throw new Exception(String.Format("Region ID {0} not found", regionID));
+ }
+ }
+ else if (requestData.ContainsKey("region_ID") &&
+ !String.IsNullOrEmpty((string)requestData["region_ID"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
+
+ UUID regionID = (UUID)(string)requestData["region_ID"];
+ if (!m_application.SceneManager.TryGetScene(regionID, out scene))
+ {
+ responseData["error"] = String.Format("Region ID {0} not found", regionID);
+ throw new Exception(String.Format("Region ID {0} not found", regionID));
+ }
+ }
+ else if (requestData.ContainsKey("regionID") &&
+ !String.IsNullOrEmpty((string)requestData["regionID"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
+
+ UUID regionID = (UUID)(string)requestData["regionID"];
+ if (!m_application.SceneManager.TryGetScene(regionID, out scene))
+ {
+ responseData["error"] = String.Format("Region ID {0} not found", regionID);
+ throw new Exception(String.Format("Region ID {0} not found", regionID));
+ }
+ }
+ else if (requestData.ContainsKey("region_uuid") &&
+ !String.IsNullOrEmpty((string)requestData["region_uuid"]))
+ {
+ m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
+
+ UUID regionID = (UUID)(string)requestData["region_uuid"];
+ if (!m_application.SceneManager.TryGetScene(regionID, out scene))
+ {
+ responseData["error"] = String.Format("Region ID {0} not found", regionID);
+ throw new Exception(String.Format("Region ID {0} not found", regionID));
+ }
+ }
+ #endregion
else if (requestData.ContainsKey("region_name") &&
!String.IsNullOrEmpty((string)requestData["region_name"]))
{
--
cgit v1.1