aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorDr Scofield2009-04-29 09:05:01 +0000
committerDr Scofield2009-04-29 09:05:01 +0000
commita89f60d4c99ec5a06becbf25974341ae405cfb82 (patch)
tree00e8fc73700dd037986fded2709c10325ff19fe3 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parentFlipping check_session xmlrpc's keep-alive to false, because some clients hang. (diff)
downloadopensim-SC-a89f60d4c99ec5a06becbf25974341ae405cfb82.zip
opensim-SC-a89f60d4c99ec5a06becbf25974341ae405cfb82.tar.gz
opensim-SC-a89f60d4c99ec5a06becbf25974341ae405cfb82.tar.bz2
opensim-SC-a89f60d4c99ec5a06becbf25974341ae405cfb82.tar.xz
From: Alan Webb <alan_webb@us.ibm.com> & Dr Scofield <drscofield@xyzzyxyzzy.net>
- Adds an admin_modify_region call to allow changing of parcel voice settings and changing of public/private status - add boolean "public" and boolean "enable_voice" to admin_create_region XmlRpc call to allow specifying of public/private status and to allow enabling voice for all parcels; also added config variables to allow setting of defaults for those - fixing cut-and-paste artefacts
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs232
1 files changed, 191 insertions, 41 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index f6bfb33..b72ef04 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -57,7 +57,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
57 private BaseHttpServer m_httpd; 57 private BaseHttpServer m_httpd;
58 private IConfig m_config; 58 private IConfig m_config;
59 private IConfigSource m_configSource; 59 private IConfigSource m_configSource;
60 private string requiredPassword = String.Empty; 60 private string m_requiredPassword = String.Empty;
61 61
62 // TODO: required by IPlugin, but likely not at all right 62 // TODO: required by IPlugin, but likely not at all right
63 private string m_name = "RemoteAdminPlugin"; 63 private string m_name = "RemoteAdminPlugin";
@@ -94,7 +94,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
94 { 94 {
95 m_config = m_configSource.Configs["RemoteAdmin"]; 95 m_config = m_configSource.Configs["RemoteAdmin"];
96 m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); 96 m_log.Info("[RADMIN]: Remote Admin Plugin Enabled");
97 requiredPassword = m_config.GetString("access_password", String.Empty); 97 m_requiredPassword = m_config.GetString("access_password", String.Empty);
98 98
99 m_app = openSim; 99 m_app = openSim;
100 m_httpd = openSim.HttpServer; 100 m_httpd = openSim.HttpServer;
@@ -102,6 +102,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
102 Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>(); 102 Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>();
103 availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod; 103 availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod;
104 availableMethods["admin_delete_region"] = XmlRpcDeleteRegionMethod; 104 availableMethods["admin_delete_region"] = XmlRpcDeleteRegionMethod;
105 availableMethods["admin_modify_region"] = XmlRpcModifyRegionMethod;
105 availableMethods["admin_region_query"] = XmlRpcRegionQueryMethod; 106 availableMethods["admin_region_query"] = XmlRpcRegionQueryMethod;
106 availableMethods["admin_shutdown"] = XmlRpcShutdownMethod; 107 availableMethods["admin_shutdown"] = XmlRpcShutdownMethod;
107 availableMethods["admin_broadcast"] = XmlRpcAlertMethod; 108 availableMethods["admin_broadcast"] = XmlRpcAlertMethod;
@@ -173,8 +174,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
173 m_log.Info("[RADMIN]: Request to restart Region."); 174 m_log.Info("[RADMIN]: Request to restart Region.");
174 checkStringParameters(request, new string[] {"password", "regionID"}); 175 checkStringParameters(request, new string[] {"password", "regionID"});
175 176
176 if (requiredPassword != String.Empty && 177 if (m_requiredPassword != String.Empty &&
177 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) 178 (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
178 { 179 {
179 throw new Exception("wrong password"); 180 throw new Exception("wrong password");
180 } 181 }
@@ -222,8 +223,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
222 223
223 checkStringParameters(request, new string[] {"password", "message"}); 224 checkStringParameters(request, new string[] {"password", "message"});
224 225
225 if (requiredPassword != String.Empty && 226 if (m_requiredPassword != String.Empty &&
226 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) 227 (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
227 throw new Exception("wrong password"); 228 throw new Exception("wrong password");
228 229
229 string message = (string) requestData["message"]; 230 string message = (string) requestData["message"];
@@ -276,8 +277,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
276 277
277 checkStringParameters(request, new string[] {"password", "filename", "regionid"}); 278 checkStringParameters(request, new string[] {"password", "filename", "regionid"});
278 279
279 if (requiredPassword != String.Empty && 280 if (m_requiredPassword != String.Empty &&
280 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) 281 (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
281 throw new Exception("wrong password"); 282 throw new Exception("wrong password");
282 283
283 string file = (string) requestData["filename"]; 284 string file = (string) requestData["filename"];
@@ -325,8 +326,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
325 { 326 {
326 Hashtable requestData = (Hashtable) request.Params[0]; 327 Hashtable requestData = (Hashtable) request.Params[0];
327 328
328 if (requiredPassword != String.Empty && 329 if (m_requiredPassword != String.Empty &&
329 (!requestData.Contains("password") || (string) requestData["password"] != requiredPassword)) 330 (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword))
330 throw new Exception("wrong password"); 331 throw new Exception("wrong password");
331 332
332 responseData["accepted"] = "true"; 333 responseData["accepted"] = "true";
@@ -408,6 +409,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
408 } 409 }
409 } 410 }
410 411
412 private bool getBoolean(Hashtable requestData, string tag, bool defv)
413 {
414 // If an access value has been provided, apply it.
415 if(requestData.Contains(tag))
416 {
417 switch(((string)requestData[tag]).ToLower())
418 {
419 case "true" :
420 case "t" :
421 case "1" :
422 return true;
423 case "false" :
424 case "f" :
425 case "0" :
426 return false;
427 default :
428 return defv;
429 }
430 }
431 else
432 return defv;
433 }
434
411 /// <summary> 435 /// <summary>
412 /// Create a new region. 436 /// Create a new region.
413 /// <summary> 437 /// <summary>
@@ -442,6 +466,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
442 /// <item><term>persist</term> 466 /// <item><term>persist</term>
443 /// <description>if true, persist the region info 467 /// <description>if true, persist the region info
444 /// ('true' or 'false')</description></item> 468 /// ('true' or 'false')</description></item>
469 /// <item><term>public</term>
470 /// <description>if true, the region is public
471 /// ('true' or 'false') (optional, default: true)</description></item>
472 /// <item><term>enable_voice</term>
473 /// <description>if true, enable voice on all parcels,
474 /// ('true' or 'false') (optional, default: false)</description></item>
445 /// </list> 475 /// </list>
446 /// 476 ///
447 /// XmlRpcCreateRegionMethod returns 477 /// XmlRpcCreateRegionMethod returns
@@ -465,7 +495,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
465 495
466 lock (rslock) 496 lock (rslock)
467 { 497 {
468 int m_regionLimit = m_config.GetInt("region_limit", 0); 498
499 int m_regionLimit = m_config.GetInt("region_limit", 0);
500 bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false);
501 bool m_publicAccess = m_config.GetBoolean("create_region_public", true);
469 502
470 try 503 try
471 { 504 {
@@ -482,13 +515,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController
482 checkIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"}); 515 checkIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"});
483 516
484 // check password 517 // check password
485 if (!String.IsNullOrEmpty(requiredPassword) && 518 if (!String.IsNullOrEmpty(m_requiredPassword) &&
486 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 519 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
487 520
488 // check whether we still have space left (iff we are using limits) 521 // check whether we still have space left (iff we are using limits)
489 if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit) 522 if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit)
490 throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first", m_regionLimit)); 523 throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first",
491 524 m_regionLimit));
492 525
493 // extract or generate region ID now 526 // extract or generate region ID now
494 Scene scene = null; 527 Scene scene = null;
@@ -619,9 +652,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController
619 region.RegionID, regionXmlPath); 652 region.RegionID, regionXmlPath);
620 region.SaveRegionToFile("dynamic region", regionXmlPath); 653 region.SaveRegionToFile("dynamic region", regionXmlPath);
621 } 654 }
655
656 // Create the region and perform any initial initialization
657
622 IScene newscene; 658 IScene newscene;
623 m_app.CreateRegion(region, out newscene); 659 m_app.CreateRegion(region, out newscene);
624 660
661 // If an access specification was provided, use it.
662 // Otherwise accept the default.
663 newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess);
664
665 // enable voice on newly created region if
666 // requested by either the XmlRpc request or the
667 // configuration
668 if (getBoolean(requestData, "enable_voice", m_enableVoiceForNewRegions))
669 {
670 List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels();
671
672 foreach(ILandObject parcel in parcels)
673 {
674 parcel.landData.Flags |= (uint) Parcel.ParcelFlags.AllowVoiceChat;
675 parcel.landData.Flags |= (uint) Parcel.ParcelFlags.UseEstateVoiceChan;
676 }
677 }
678
625 responseData["success"] = "true"; 679 responseData["success"] = "true";
626 responseData["region_name"] = region.RegionName; 680 responseData["region_name"] = region.RegionName;
627 responseData["region_uuid"] = region.RegionID.ToString(); 681 responseData["region_uuid"] = region.RegionID.ToString();
@@ -649,7 +703,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
649 /// <summary> 703 /// <summary>
650 /// <param name="request">incoming XML RPC request</param> 704 /// <param name="request">incoming XML RPC request</param>
651 /// <remarks> 705 /// <remarks>
652 /// XmlRpcCreateRegionMethod takes the following XMLRPC 706 /// XmlRpcDeleteRegionMethod takes the following XMLRPC
653 /// parameters 707 /// parameters
654 /// <list type="table"> 708 /// <list type="table">
655 /// <listheader><term>parameter name</term><description>description</description></listheader> 709 /// <listheader><term>parameter name</term><description>description</description></listheader>
@@ -661,7 +715,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
661 /// <description>(optional) desired region UUID</description></item> 715 /// <description>(optional) desired region UUID</description></item>
662 /// </list> 716 /// </list>
663 /// 717 ///
664 /// XmlRpcCreateRegionMethod returns 718 /// XmlRpcDeleteRegionMethod returns
665 /// <list type="table"> 719 /// <list type="table">
666 /// <listheader><term>name</term><description>description</description></listheader> 720 /// <listheader><term>name</term><description>description</description></listheader>
667 /// <item><term>success</term> 721 /// <item><term>success</term>
@@ -712,6 +766,102 @@ namespace OpenSim.ApplicationPlugins.RemoteController
712 } 766 }
713 767
714 /// <summary> 768 /// <summary>
769 /// Change characteristics of an existing region.
770 /// <summary>
771 /// <param name="request">incoming XML RPC request</param>
772 /// <remarks>
773 /// XmlRpcModifyRegionMethod takes the following XMLRPC
774 /// parameters
775 /// <list type="table">
776 /// <listheader><term>parameter name</term><description>description</description></listheader>
777 /// <item><term>password</term>
778 /// <description>admin password as set in OpenSim.ini</description></item>
779 /// <item><term>region_name</term>
780 /// <description>desired region name</description></item>
781 /// <item><term>region_id</term>
782 /// <description>(optional) desired region UUID</description></item>
783 /// <item><term>public</term>
784 /// <description>if true, set the region to public
785 /// ('true' or 'false'), else to private</description></item>
786 /// <item><term>enable_voice</term>
787 /// <description>if true, enable voice on all parcels of
788 /// the region, else disable</description></item>
789 /// </list>
790 ///
791 /// XmlRpcModifyRegionMethod returns
792 /// <list type="table">
793 /// <listheader><term>name</term><description>description</description></listheader>
794 /// <item><term>success</term>
795 /// <description>true or false</description></item>
796 /// <item><term>error</term>
797 /// <description>error message if success is false</description></item>
798 /// </list>
799 /// </remarks>
800
801 public XmlRpcResponse XmlRpcModifyRegionMethod(XmlRpcRequest request)
802 {
803 m_log.Info("[RADMIN]: ModifyRegion: new request");
804 XmlRpcResponse response = new XmlRpcResponse();
805 Hashtable responseData = new Hashtable();
806
807 lock (rslock)
808 {
809 try
810 {
811 Hashtable requestData = (Hashtable) request.Params[0];
812 checkStringParameters(request, new string[] {"password", "region_name"});
813
814 Scene scene = null;
815 string regionName = (string) requestData["region_name"];
816 if (!m_app.SceneManager.TryGetScene(regionName, out scene))
817 throw new Exception(String.Format("region \"{0}\" does not exist", regionName));
818
819 // Modify access
820 scene.RegionInfo.EstateSettings.PublicAccess =
821 getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess);
822
823 if (requestData.ContainsKey("enable_voice"))
824 {
825 bool enableVoice = getBoolean(requestData, "enable_voice", true);
826 List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels();
827
828 foreach(ILandObject parcel in parcels)
829 {
830 if (enableVoice)
831 {
832 parcel.landData.Flags |= (uint)Parcel.ParcelFlags.AllowVoiceChat;
833 parcel.landData.Flags |= (uint)Parcel.ParcelFlags.UseEstateVoiceChan;
834 }
835 else
836 {
837 parcel.landData.Flags &= ~(uint)Parcel.ParcelFlags.AllowVoiceChat;
838 parcel.landData.Flags &= ~(uint)Parcel.ParcelFlags.UseEstateVoiceChan;
839 }
840 }
841 }
842
843 responseData["success"] = "true";
844 responseData["region_name"] = regionName;
845
846 response.Value = responseData;
847 }
848 catch (Exception e)
849 {
850 m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0}", e.Message);
851 m_log.DebugFormat("[RADMIN] ModifyRegion: failed {0}", e.ToString());
852
853 responseData["success"] = "false";
854 responseData["error"] = e.Message;
855
856 response.Value = responseData;
857 }
858
859 m_log.Info("[RADMIN]: ModifyRegion: request complete");
860 return response;
861 }
862 }
863
864 /// <summary>
715 /// Create a new user account. 865 /// Create a new user account.
716 /// <summary> 866 /// <summary>
717 /// <param name="request">incoming XML RPC request</param> 867 /// <param name="request">incoming XML RPC request</param>
@@ -770,8 +920,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
770 checkIntegerParams(request, new string[] {"start_region_x", "start_region_y"}); 920 checkIntegerParams(request, new string[] {"start_region_x", "start_region_y"});
771 921
772 // check password 922 // check password
773 if (!String.IsNullOrEmpty(requiredPassword) && 923 if (!String.IsNullOrEmpty(m_requiredPassword) &&
774 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 924 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
775 925
776 // do the job 926 // do the job
777 string firstname = (string) requestData["user_firstname"]; 927 string firstname = (string) requestData["user_firstname"];
@@ -951,8 +1101,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
951 "user_lastname"}); 1101 "user_lastname"});
952 1102
953 // check password 1103 // check password
954 if (!String.IsNullOrEmpty(requiredPassword) && 1104 if (!String.IsNullOrEmpty(m_requiredPassword) &&
955 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1105 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
956 1106
957 // do the job 1107 // do the job
958 string firstname = (string) requestData["user_firstname"]; 1108 string firstname = (string) requestData["user_firstname"];
@@ -1101,8 +1251,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1101 } 1251 }
1102 1252
1103 // check password 1253 // check password
1104 if (!String.IsNullOrEmpty(requiredPassword) && 1254 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1105 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1255 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1106 1256
1107 string filename = (string) requestData["filename"]; 1257 string filename = (string) requestData["filename"];
1108 Scene scene = null; 1258 Scene scene = null;
@@ -1198,8 +1348,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1198 } 1348 }
1199 1349
1200 // check password 1350 // check password
1201 if (!String.IsNullOrEmpty(requiredPassword) && 1351 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1202 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1352 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1203 1353
1204 string filename = (string) requestData["filename"]; 1354 string filename = (string) requestData["filename"];
1205 Scene scene = null; 1355 Scene scene = null;
@@ -1264,8 +1414,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1264 } 1414 }
1265 1415
1266 // check password 1416 // check password
1267 if (!String.IsNullOrEmpty(requiredPassword) && 1417 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1268 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1418 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1269 1419
1270 string filename = (string) requestData["filename"]; 1420 string filename = (string) requestData["filename"];
1271 if (requestData.Contains("region_uuid")) 1421 if (requestData.Contains("region_uuid"))
@@ -1347,8 +1497,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1347 } 1497 }
1348 1498
1349 // check password 1499 // check password
1350 if (!String.IsNullOrEmpty(requiredPassword) && 1500 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1351 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1501 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1352 1502
1353 string filename = (string) requestData["filename"]; 1503 string filename = (string) requestData["filename"];
1354 if (requestData.Contains("region_uuid")) 1504 if (requestData.Contains("region_uuid"))
@@ -1424,8 +1574,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1424 // check completeness 1574 // check completeness
1425 if (!requestData.Contains("password")) 1575 if (!requestData.Contains("password"))
1426 throw new Exception(String.Format("missing required parameter")); 1576 throw new Exception(String.Format("missing required parameter"));
1427 if (!String.IsNullOrEmpty(requiredPassword) && 1577 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1428 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1578 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1429 1579
1430 if (requestData.Contains("region_uuid")) 1580 if (requestData.Contains("region_uuid"))
1431 { 1581 {
@@ -1480,8 +1630,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1480 // check completeness 1630 // check completeness
1481 if (!requestData.Contains("password")) 1631 if (!requestData.Contains("password"))
1482 throw new Exception(String.Format("missing required parameter")); 1632 throw new Exception(String.Format("missing required parameter"));
1483 if (!String.IsNullOrEmpty(requiredPassword) && 1633 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1484 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1634 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1485 1635
1486 if (!requestData.Contains("command")) 1636 if (!requestData.Contains("command"))
1487 throw new Exception(String.Format("missing required parameter")); 1637 throw new Exception(String.Format("missing required parameter"));
@@ -1518,8 +1668,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1518 1668
1519 if (!requestData.Contains("password")) 1669 if (!requestData.Contains("password"))
1520 throw new Exception(String.Format("missing required parameter")); 1670 throw new Exception(String.Format("missing required parameter"));
1521 if (!String.IsNullOrEmpty(requiredPassword) && 1671 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1522 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1672 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1523 1673
1524 if (requestData.Contains("region_uuid")) 1674 if (requestData.Contains("region_uuid"))
1525 { 1675 {
@@ -1573,8 +1723,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1573 1723
1574 if (!requestData.Contains("password")) 1724 if (!requestData.Contains("password"))
1575 throw new Exception(String.Format("missing required parameter")); 1725 throw new Exception(String.Format("missing required parameter"));
1576 if (!String.IsNullOrEmpty(requiredPassword) && 1726 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1577 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1727 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1578 1728
1579 if (requestData.Contains("region_uuid")) 1729 if (requestData.Contains("region_uuid"))
1580 { 1730 {
@@ -1652,8 +1802,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1652 1802
1653 if (!requestData.Contains("password")) 1803 if (!requestData.Contains("password"))
1654 throw new Exception(String.Format("missing required parameter")); 1804 throw new Exception(String.Format("missing required parameter"));
1655 if (!String.IsNullOrEmpty(requiredPassword) && 1805 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1656 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1806 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1657 1807
1658 if (requestData.Contains("region_uuid")) 1808 if (requestData.Contains("region_uuid"))
1659 { 1809 {
@@ -1732,8 +1882,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1732 1882
1733 if (!requestData.Contains("password")) 1883 if (!requestData.Contains("password"))
1734 throw new Exception(String.Format("missing required parameter")); 1884 throw new Exception(String.Format("missing required parameter"));
1735 if (!String.IsNullOrEmpty(requiredPassword) && 1885 if (!String.IsNullOrEmpty(m_requiredPassword) &&
1736 (string) requestData["password"] != requiredPassword) throw new Exception("wrong password"); 1886 (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password");
1737 1887
1738 if (requestData.Contains("region_uuid")) 1888 if (requestData.Contains("region_uuid"))
1739 { 1889 {