aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorUbitUmarov2015-09-06 21:46:30 +0100
committerUbitUmarov2015-09-06 21:46:30 +0100
commitcfcfa8f3d70f8de714daa06912b1c6f86b2689e2 (patch)
tree903d0f5d5a224c823b7753455e036e7dfdd9496c /OpenSim/ApplicationPlugins
parentremove a forgotten cast to int (diff)
downloadopensim-SC-cfcfa8f3d70f8de714daa06912b1c6f86b2689e2.zip
opensim-SC-cfcfa8f3d70f8de714daa06912b1c6f86b2689e2.tar.gz
opensim-SC-cfcfa8f3d70f8de714daa06912b1c6f86b2689e2.tar.bz2
opensim-SC-cfcfa8f3d70f8de714daa06912b1c6f86b2689e2.tar.xz
add lost admin_reset_land method
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 0c582e1..9664433 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -144,6 +144,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
144 availableMethods["admin_load_heightmap"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcLoadHeightmapMethod); 144 availableMethods["admin_load_heightmap"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcLoadHeightmapMethod);
145 availableMethods["admin_save_heightmap"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcSaveHeightmapMethod); 145 availableMethods["admin_save_heightmap"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcSaveHeightmapMethod);
146 146
147 availableMethods["admin_reset_land"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcResetLand);
148
147 // Agent management 149 // Agent management
148 availableMethods["admin_get_agents"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetAgentsMethod); 150 availableMethods["admin_get_agents"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetAgentsMethod);
149 availableMethods["admin_teleport_agent"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcTeleportAgentMethod); 151 availableMethods["admin_teleport_agent"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcTeleportAgentMethod);
@@ -2210,6 +2212,51 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2210 responseData["success"] = true; 2212 responseData["success"] = true;
2211 } 2213 }
2212 2214
2215 private void XmlRpcResetLand(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
2216 {
2217 Hashtable requestData = (Hashtable)request.Params[0];
2218 Hashtable responseData = (Hashtable)response.Value;
2219 string musicURL = string.Empty;
2220 UUID groupID = UUID.Zero;
2221 uint flags = 0;
2222 bool set_group = false, set_music = false, set_flags = false;
2223
2224 if (requestData.Contains("group") && requestData["group"] != null)
2225 set_group = UUID.TryParse(requestData["group"].ToString(), out groupID);
2226 if (requestData.Contains("music") && requestData["music"] != null)
2227 {
2228
2229 musicURL = requestData["music"].ToString();
2230 set_music = true;
2231 }
2232
2233 if (requestData.Contains("flags") && requestData["flags"] != null)
2234 set_flags = UInt32.TryParse(requestData["flags"].ToString(), out flags);
2235
2236 m_log.InfoFormat("[RADMIN]: Received Reset Land Request group={0} musicURL={1} flags={2}",
2237 (set_group ? groupID.ToString() : "unchanged"),
2238 (set_music ? musicURL : "unchanged"),
2239 (set_flags ? flags.ToString() : "unchanged"));
2240
2241 m_application.SceneManager.ForEachScene(delegate (Scene s)
2242 {
2243 List<ILandObject> parcels = s.LandChannel.AllParcels();
2244 foreach (ILandObject p in parcels)
2245 {
2246 if (set_music)
2247 p.LandData.MusicURL = musicURL;
2248 if (set_group)
2249 p.LandData.GroupID = groupID;
2250 if (set_flags)
2251 p.LandData.Flags = flags;
2252 s.LandChannel.UpdateLandObject(p.LandData.LocalID, p.LandData);
2253 }
2254 }
2255 );
2256 responseData["success"] = true;
2257 m_log.Info("[RADMIN]: Reset Land Request complete");
2258 }
2259
2213 private void XmlRpcRefreshSearch(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) 2260 private void XmlRpcRefreshSearch(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
2214 { 2261 {
2215 m_log.Info("[RADMIN]: Received Refresh Search Request"); 2262 m_log.Info("[RADMIN]: Received Refresh Search Request");