diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 95 |
1 files changed, 12 insertions, 83 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 437d150..3d80eb6 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((string) requestData["persist"]); | 699 | bool persist = Convert.ToBoolean(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,7 +852,6 @@ 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 | ||
856 | 855 | ||
857 | m_log.Info("[RADMIN]: CreateRegion: request complete"); | 856 | m_log.Info("[RADMIN]: CreateRegion: request complete"); |
858 | } | 857 | } |
@@ -1106,8 +1105,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1106 | string lastName = (string) requestData["user_lastname"]; | 1105 | string lastName = (string) requestData["user_lastname"]; |
1107 | string password = (string) requestData["user_password"]; | 1106 | string password = (string) requestData["user_password"]; |
1108 | 1107 | ||
1109 | uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); | 1108 | uint regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); |
1110 | uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); | 1109 | uint regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); |
1111 | 1110 | ||
1112 | string email = ""; // empty string for email | 1111 | string email = ""; // empty string for email |
1113 | if (requestData.Contains("user_email")) | 1112 | if (requestData.Contains("user_email")) |
@@ -1304,9 +1303,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1304 | 1303 | ||
1305 | if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; | 1304 | if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; |
1306 | if (requestData.ContainsKey("start_region_x")) | 1305 | if (requestData.ContainsKey("start_region_x")) |
1307 | regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); | 1306 | regionXLocation = Convert.ToUInt32(requestData["start_region_x"]); |
1308 | if (requestData.ContainsKey("start_region_y")) | 1307 | if (requestData.ContainsKey("start_region_y")) |
1309 | regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); | 1308 | regionYLocation = Convert.ToUInt32(requestData["start_region_y"]); |
1310 | 1309 | ||
1311 | // if (requestData.ContainsKey("start_lookat_x")) | 1310 | // if (requestData.ContainsKey("start_lookat_x")) |
1312 | // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]); | 1311 | // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]); |
@@ -1493,6 +1492,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1493 | /// <description>profile url</description></item> | 1492 | /// <description>profile url</description></item> |
1494 | /// <item><term>noassets</term> | 1493 | /// <item><term>noassets</term> |
1495 | /// <description>true if no assets should be saved</description></item> | 1494 | /// <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> | ||
1496 | /// <item><term>perm</term> | 1497 | /// <item><term>perm</term> |
1497 | /// <description>C and/or T</description></item> | 1498 | /// <description>C and/or T</description></item> |
1498 | /// </list> | 1499 | /// </list> |
@@ -1549,6 +1550,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1549 | options["checkPermissions"] = (string)requestData["perm"]; | 1550 | options["checkPermissions"] = (string)requestData["perm"]; |
1550 | } | 1551 | } |
1551 | 1552 | ||
1553 | if ((string)requestData["all"] == "true") | ||
1554 | { | ||
1555 | options["all"] = (string)requestData["all"]; | ||
1556 | } | ||
1557 | |||
1552 | IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); | 1558 | IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); |
1553 | 1559 | ||
1554 | if (archiver != null) | 1560 | if (archiver != null) |
@@ -2008,29 +2014,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2008 | { | 2014 | { |
2009 | return; | 2015 | return; |
2010 | } | 2016 | } |
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 | ||
2034 | else | 2017 | else |
2035 | { | 2018 | { |
2036 | responseData["accepted"] = false; | 2019 | responseData["accepted"] = false; |
@@ -2052,56 +2035,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2052 | throw new Exception(String.Format("Region ID {0} not found", regionID)); | 2035 | throw new Exception(String.Format("Region ID {0} not found", regionID)); |
2053 | } | 2036 | } |
2054 | } | 2037 | } |
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 | ||
2105 | else if (requestData.ContainsKey("region_name") && | 2038 | else if (requestData.ContainsKey("region_name") && |
2106 | !String.IsNullOrEmpty((string)requestData["region_name"])) | 2039 | !String.IsNullOrEmpty((string)requestData["region_name"])) |
2107 | { | 2040 | { |
@@ -2515,7 +2448,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2515 | destinationItem.Description = item.Description; | 2448 | destinationItem.Description = item.Description; |
2516 | destinationItem.InvType = item.InvType; | 2449 | destinationItem.InvType = item.InvType; |
2517 | destinationItem.CreatorId = item.CreatorId; | 2450 | destinationItem.CreatorId = item.CreatorId; |
2518 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | ||
2519 | destinationItem.CreatorData = item.CreatorData; | 2451 | destinationItem.CreatorData = item.CreatorData; |
2520 | destinationItem.NextPermissions = item.NextPermissions; | 2452 | destinationItem.NextPermissions = item.NextPermissions; |
2521 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 2453 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
@@ -2570,7 +2502,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2570 | destinationItem.Description = item.Description; | 2502 | destinationItem.Description = item.Description; |
2571 | destinationItem.InvType = item.InvType; | 2503 | destinationItem.InvType = item.InvType; |
2572 | destinationItem.CreatorId = item.CreatorId; | 2504 | destinationItem.CreatorId = item.CreatorId; |
2573 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | ||
2574 | destinationItem.CreatorData = item.CreatorData; | 2505 | destinationItem.CreatorData = item.CreatorData; |
2575 | destinationItem.NextPermissions = item.NextPermissions; | 2506 | destinationItem.NextPermissions = item.NextPermissions; |
2576 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 2507 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
@@ -2683,7 +2614,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2683 | destinationItem.Description = item.Description; | 2614 | destinationItem.Description = item.Description; |
2684 | destinationItem.InvType = item.InvType; | 2615 | destinationItem.InvType = item.InvType; |
2685 | destinationItem.CreatorId = item.CreatorId; | 2616 | destinationItem.CreatorId = item.CreatorId; |
2686 | destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; | ||
2687 | destinationItem.CreatorData = item.CreatorData; | 2617 | destinationItem.CreatorData = item.CreatorData; |
2688 | destinationItem.NextPermissions = item.NextPermissions; | 2618 | destinationItem.NextPermissions = item.NextPermissions; |
2689 | destinationItem.CurrentPermissions = item.CurrentPermissions; | 2619 | destinationItem.CurrentPermissions = item.CurrentPermissions; |
@@ -2989,7 +2919,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2989 | inventoryItem.Description = GetStringAttribute(item,"desc",""); | 2919 | inventoryItem.Description = GetStringAttribute(item,"desc",""); |
2990 | inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); | 2920 | inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); |
2991 | inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); | 2921 | inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); |
2992 | inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); | ||
2993 | inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", ""); | 2922 | inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", ""); |
2994 | inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff); | 2923 | inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff); |
2995 | inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); | 2924 | inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); |