Remove superfluous try block

avinationmerge
Melanie 2011-12-08 05:28:54 +01:00
parent 7c7dd6269a
commit 1e4842eaba
1 changed files with 14 additions and 27 deletions

View File

@ -214,7 +214,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
Hashtable requestData = (Hashtable) request.Params[0]; Hashtable requestData = (Hashtable) request.Params[0];
m_log.Info("[RADMIN]: Request to restart Region.");
CheckStringParameters(requestData, responseData, new string[] {"password"}); CheckStringParameters(requestData, responseData, new string[] {"password"});
FailIfRemoteAdminNotAllowed((string)requestData["password"], responseData, remoteClient.Address.ToString()); FailIfRemoteAdminNotAllowed((string)requestData["password"], responseData, remoteClient.Address.ToString());
@ -358,36 +357,24 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.Info("[RADMIN]: Dialog request started"); m_log.Info("[RADMIN]: Dialog request started");
try Hashtable requestData = (Hashtable)request.Params[0];
{
Hashtable requestData = (Hashtable)request.Params[0];
string message = (string)requestData["message"]; string message = (string)requestData["message"];
string fromuuid = (string)requestData["from"]; string fromuuid = (string)requestData["from"];
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message); m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
responseData["accepted"] = true; responseData["accepted"] = true;
responseData["success"] = true; responseData["success"] = true;
m_application.SceneManager.ForEachScene( m_application.SceneManager.ForEachScene(
delegate(Scene scene) delegate(Scene scene)
{ {
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>(); IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
if (dialogModule != null) if (dialogModule != null)
dialogModule.SendNotificationToUsersInRegion(UUID.Zero, fromuuid, message); dialogModule.SendNotificationToUsersInRegion(UUID.Zero, fromuuid, message);
}); });
}
catch (Exception e)
{
m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message);
m_log.DebugFormat("[RADMIN]: Broadcasting: failed: {0}", e.ToString());
responseData["accepted"] = false; m_log.Info("[RADMIN]: Dialog request complete");
responseData["success"] = false;
responseData["error"] = e.Message;
}
m_log.Info("[RADMIN]: Alert request complete");
} }
private void XmlRpcLoadHeightmapMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) private void XmlRpcLoadHeightmapMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)