From c8faccb396c17183fd66a5fddc814461aad0cddb Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 3 Dec 2007 07:14:58 +0000 Subject: [PATCH] * Added XMLRPC Broadcast Alert method. * Renamed a few console messages to match the new "RADMIN" tag for remote-admin stuff. --- .../RemoteController/RemoteAdminPlugin.cs | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index d4a11d9ab6..8cd6fc631d 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -36,12 +36,30 @@ namespace OpenSim.ApplicationPlugins.LoadRegions m_httpd.AddXmlRPCHandler("admin_create_region", XmlRpcCreateRegionMethod); m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); + m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); } } + public XmlRpcResponse XmlRpcAlertMethod(XmlRpcRequest request) + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable requestData = (Hashtable)request.Params[0]; + + string message = (string)requestData["message"]; + MainLog.Instance.Verbose("RADMIN", "Broadcasting: " + message); + + Hashtable responseData = new Hashtable(); + responseData["accepted"] = "true"; + response.Value = responseData; + + m_app.SceneManager.SendGeneralMessage(message); + + return response; + } + public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) { - MainLog.Instance.Verbose("CONTROLLER", "Recieved Shutdown Administrator Request"); + MainLog.Instance.Verbose("RADMIN", "Recieved Shutdown Administrator Request"); XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0]; @@ -89,7 +107,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions public XmlRpcResponse XmlRpcCreateRegionMethod(XmlRpcRequest request) { - MainLog.Instance.Verbose("CONTROLLER", "Recieved Create Region Administrator Request"); + MainLog.Instance.Verbose("RADMIN", "Recieved Create Region Administrator Request"); XmlRpcResponse response = new XmlRpcResponse(); Hashtable requestData = (Hashtable)request.Params[0];