From 8388fe0669f9d140028d1925284491b21a09a1bf Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 8 Sep 2008 14:30:35 +0000 Subject: * some if inversions and added {}'s for readability --- .../ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 7803d92..9451f00 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -71,8 +71,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_configSource = openSim.ConfigSource.Source; try { - if (m_configSource.Configs["RemoteAdmin"] != null && - m_configSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) + if (m_configSource.Configs["RemoteAdmin"] == null || + !m_configSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) + { + // No config or disabled + } + else { m_config = m_configSource.Configs["RemoteAdmin"]; m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); @@ -110,8 +114,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController checkStringParameters(request, new string[] { "password", "regionID" }); if (requiredPassword != String.Empty && - (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) + (!requestData.Contains("password") || (string)requestData["password"] != requiredPassword)) + { throw new Exception("wrong password"); + } UUID regionID = new UUID((string) requestData["regionID"]); -- cgit v1.1