aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorteravus2012-11-15 10:05:16 -0500
committerteravus2012-11-15 10:05:16 -0500
commite9153e1d1aae50024d8cd05fe14a9bce34343a0e (patch)
treebc111d34f95a26b99c7e34d9e495dc14d1802cc3 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parentMerge master into teravuswork (diff)
downloadopensim-SC_OLD-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.zip
opensim-SC_OLD-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.gz
opensim-SC_OLD-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.bz2
opensim-SC_OLD-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.xz
Revert "Merge master into teravuswork", it should have been avination, not master.
This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs91
1 files changed, 79 insertions, 12 deletions
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
696 696
697 region.ExternalHostName = (string) requestData["external_address"]; 697 region.ExternalHostName = (string) requestData["external_address"];
698 698
699 bool persist = Convert.ToBoolean(requestData["persist"]); 699 bool persist = Convert.ToBoolean((string) requestData["persist"]);
700 if (persist) 700 if (persist)
701 { 701 {
702 // default place for region configuration files is in the 702 // default place for region configuration files is in the
@@ -852,6 +852,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
852 responseData["success"] = true; 852 responseData["success"] = true;
853 responseData["region_name"] = region.RegionName; 853 responseData["region_name"] = region.RegionName;
854 responseData["region_id"] = region.RegionID.ToString(); 854 responseData["region_id"] = region.RegionID.ToString();
855 responseData["region_uuid"] = region.RegionID.ToString(); //Deprecate July 2012
855 856
856 m_log.Info("[RADMIN]: CreateRegion: request complete"); 857 m_log.Info("[RADMIN]: CreateRegion: request complete");
857 } 858 }
@@ -1105,8 +1106,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1105 string lastName = (string) requestData["user_lastname"]; 1106 string lastName = (string) requestData["user_lastname"];
1106 string password = (string) requestData["user_password"]; 1107 string password = (string) requestData["user_password"];
1107 1108
1108 uint regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); 1109 uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]);
1109 uint regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); 1110 uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]);
1110 1111
1111 string email = ""; // empty string for email 1112 string email = ""; // empty string for email
1112 if (requestData.Contains("user_email")) 1113 if (requestData.Contains("user_email"))
@@ -1303,9 +1304,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1303 1304
1304 if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; 1305 if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"];
1305 if (requestData.ContainsKey("start_region_x")) 1306 if (requestData.ContainsKey("start_region_x"))
1306 regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); 1307 regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]);
1307 if (requestData.ContainsKey("start_region_y")) 1308 if (requestData.ContainsKey("start_region_y"))
1308 regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); 1309 regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]);
1309 1310
1310 // if (requestData.ContainsKey("start_lookat_x")) 1311 // if (requestData.ContainsKey("start_lookat_x"))
1311 // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]); 1312 // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]);
@@ -1492,8 +1493,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1492 /// <description>profile url</description></item> 1493 /// <description>profile url</description></item>
1493 /// <item><term>noassets</term> 1494 /// <item><term>noassets</term>
1494 /// <description>true if no assets should be saved</description></item> 1495 /// <description>true if no assets should be saved</description></item>
1495 /// <item><term>all</term>
1496 /// <description>true to save all the regions in the simulator</description></item>
1497 /// <item><term>perm</term> 1496 /// <item><term>perm</term>
1498 /// <description>C and/or T</description></item> 1497 /// <description>C and/or T</description></item>
1499 /// </list> 1498 /// </list>
@@ -1550,11 +1549,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1550 options["checkPermissions"] = (string)requestData["perm"]; 1549 options["checkPermissions"] = (string)requestData["perm"];
1551 } 1550 }
1552 1551
1553 if ((string)requestData["all"] == "true")
1554 {
1555 options["all"] = (string)requestData["all"];
1556 }
1557
1558 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 1552 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
1559 1553
1560 if (archiver != null) 1554 if (archiver != null)
@@ -2014,6 +2008,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2014 { 2008 {
2015 return; 2009 return;
2016 } 2010 }
2011 #region Deprecate July 2012
2012 //region_ID, regionid, region_uuid will be deprecated in July 2012!!!!!!
2013 else if (requestData.ContainsKey("regionid") &&
2014 !String.IsNullOrEmpty((string)requestData["regionid"]))
2015 {
2016 m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
2017 }
2018 else if (requestData.ContainsKey("region_ID") &&
2019 !String.IsNullOrEmpty((string)requestData["region_ID"]))
2020 {
2021 m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
2022 }
2023 else if (requestData.ContainsKey("regionID") &&
2024 !String.IsNullOrEmpty((string)requestData["regionID"]))
2025 {
2026 m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
2027 }
2028 else if (requestData.ContainsKey("region_uuid") &&
2029 !String.IsNullOrEmpty((string)requestData["region_uuid"]))
2030 {
2031 m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
2032 }
2033 #endregion
2017 else 2034 else
2018 { 2035 {
2019 responseData["accepted"] = false; 2036 responseData["accepted"] = false;
@@ -2035,6 +2052,56 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2035 throw new Exception(String.Format("Region ID {0} not found", regionID)); 2052 throw new Exception(String.Format("Region ID {0} not found", regionID));
2036 } 2053 }
2037 } 2054 }
2055 #region Deprecate July 2012
2056 else if (requestData.ContainsKey("regionid") &&
2057 !String.IsNullOrEmpty((string)requestData["regionid"]))
2058 {
2059 m_log.WarnFormat("[RADMIN]: Use of parameter regionid will be deprecated as of July 2012. Use region_id instead");
2060
2061 UUID regionID = (UUID)(string)requestData["regionid"];
2062 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2063 {
2064 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2065 throw new Exception(String.Format("Region ID {0} not found", regionID));
2066 }
2067 }
2068 else if (requestData.ContainsKey("region_ID") &&
2069 !String.IsNullOrEmpty((string)requestData["region_ID"]))
2070 {
2071 m_log.WarnFormat("[RADMIN]: Use of parameter region_ID will be deprecated as of July 2012. Use region_id instead");
2072
2073 UUID regionID = (UUID)(string)requestData["region_ID"];
2074 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2075 {
2076 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2077 throw new Exception(String.Format("Region ID {0} not found", regionID));
2078 }
2079 }
2080 else if (requestData.ContainsKey("regionID") &&
2081 !String.IsNullOrEmpty((string)requestData["regionID"]))
2082 {
2083 m_log.WarnFormat("[RADMIN]: Use of parameter regionID will be deprecated as of July 2012. Use region_id instead");
2084
2085 UUID regionID = (UUID)(string)requestData["regionID"];
2086 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2087 {
2088 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2089 throw new Exception(String.Format("Region ID {0} not found", regionID));
2090 }
2091 }
2092 else if (requestData.ContainsKey("region_uuid") &&
2093 !String.IsNullOrEmpty((string)requestData["region_uuid"]))
2094 {
2095 m_log.WarnFormat("[RADMIN]: Use of parameter region_uuid will be deprecated as of July 2012. Use region_id instead");
2096
2097 UUID regionID = (UUID)(string)requestData["region_uuid"];
2098 if (!m_application.SceneManager.TryGetScene(regionID, out scene))
2099 {
2100 responseData["error"] = String.Format("Region ID {0} not found", regionID);
2101 throw new Exception(String.Format("Region ID {0} not found", regionID));
2102 }
2103 }
2104 #endregion
2038 else if (requestData.ContainsKey("region_name") && 2105 else if (requestData.ContainsKey("region_name") &&
2039 !String.IsNullOrEmpty((string)requestData["region_name"])) 2106 !String.IsNullOrEmpty((string)requestData["region_name"]))
2040 { 2107 {