aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorJeff Ames2009-10-01 01:00:09 +0900
committerJeff Ames2009-10-01 01:17:47 +0900
commitee205e7e812e170f670e690a4e0fa9caa652f226 (patch)
treedf407e66d9aa47a884e39d5d86b877d6ef468a1a /OpenSim/ApplicationPlugins
parentadding LandDataSerializer (not connected anywhere, work-in-progress) (diff)
downloadopensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.zip
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.gz
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.bz2
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r--OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs4
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs151
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs2
3 files changed, 51 insertions, 106 deletions
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
index 20cec04..0f827b0 100644
--- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
@@ -185,11 +185,11 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
185 } 185 }
186 186
187 protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) 187 protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder)
188 { 188 {
189 m_commsManager 189 m_commsManager
190 = new HGCommunicationsStandalone( 190 = new HGCommunicationsStandalone(
191 m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, 191 m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer,
192 libraryRootFolder, false); 192 libraryRootFolder, false);
193 193
194 CreateGridInfoService(); 194 CreateGridInfoService();
195 } 195 }
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 7e0a4ba..ef45f73 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -69,7 +69,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
69 private string m_name = "RemoteAdminPlugin"; 69 private string m_name = "RemoteAdminPlugin";
70 private string m_version = "0.0"; 70 private string m_version = "0.0";
71 71
72 //AnakinLohner 0.6.5-post-fixes
73 //guard for XmlRpc-related methods 72 //guard for XmlRpc-related methods
74 private void FailIfRemoteAdminDisabled(string requestName) 73 private void FailIfRemoteAdminDisabled(string requestName)
75 { 74 {
@@ -142,7 +141,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
142 availableMethods["admin_acl_remove"] = XmlRpcAccessListRemove; 141 availableMethods["admin_acl_remove"] = XmlRpcAccessListRemove;
143 availableMethods["admin_acl_list"] = XmlRpcAccessListList; 142 availableMethods["admin_acl_list"] = XmlRpcAccessListList;
144 143
145 // Either enable full remote functionality or just selected features 144 // Either enable full remote functionality or just selected features
146 string enabledMethods = m_config.GetString("enabled_methods", "all"); 145 string enabledMethods = m_config.GetString("enabled_methods", "all");
147 146
148 // To get this, you must explicitly specify "all" or 147 // To get this, you must explicitly specify "all" or
@@ -469,7 +468,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
469 { 468 {
470 m_log.Info("[RADMIN]: CreateRegion: new request"); 469 m_log.Info("[RADMIN]: CreateRegion: new request");
471 470
472 //AnakinLohner 0.6.5-post-fixes
473 FailIfRemoteAdminDisabled("CreateRegion"); 471 FailIfRemoteAdminDisabled("CreateRegion");
474 472
475 XmlRpcResponse response = new XmlRpcResponse(); 473 XmlRpcResponse response = new XmlRpcResponse();
@@ -477,7 +475,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
477 475
478 lock (rslock) 476 lock (rslock)
479 { 477 {
480
481 int m_regionLimit = m_config.GetInt("region_limit", 0); 478 int m_regionLimit = m_config.GetInt("region_limit", 0);
482 bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false); 479 bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false);
483 bool m_publicAccess = m_config.GetBoolean("create_region_public", true); 480 bool m_publicAccess = m_config.GetBoolean("create_region_public", true);
@@ -502,7 +499,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
502 499
503 // check whether we still have space left (iff we are using limits) 500 // check whether we still have space left (iff we are using limits)
504 if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit) 501 if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit)
505 throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first", 502 throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first",
506 m_regionLimit)); 503 m_regionLimit));
507 // extract or generate region ID now 504 // extract or generate region ID now
508 Scene scene = null; 505 Scene scene = null;
@@ -561,7 +558,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
561 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, 558 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
562 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 559 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
563 560
564
565 region.ExternalHostName = (string) requestData["external_address"]; 561 region.ExternalHostName = (string) requestData["external_address"];
566 562
567 string masterFirst = (string) requestData["region_master_first"]; 563 string masterFirst = (string) requestData["region_master_first"];
@@ -580,10 +576,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
580 if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar 576 if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar
581 { 577 {
582 // no client supplied UUID: look it up... 578 // no client supplied UUID: look it up...
583 CachedUserInfo userInfo 579 CachedUserInfo userInfo
584 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails( 580 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(
585 masterFirst, masterLast); 581 masterFirst, masterLast);
586 582
587 if (null == userInfo) 583 if (null == userInfo)
588 { 584 {
589 m_log.InfoFormat("master avatar does not exist, creating it"); 585 m_log.InfoFormat("master avatar does not exist, creating it");
@@ -636,7 +632,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
636 m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", 632 m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}",
637 region.RegionID, regionXmlPath); 633 region.RegionID, regionXmlPath);
638 region.SaveRegionToFile("dynamic region", regionXmlPath); 634 region.SaveRegionToFile("dynamic region", regionXmlPath);
639 } 635 }
640 else 636 else
641 { 637 {
642 region.Persistent = false; 638 region.Persistent = false;
@@ -664,7 +660,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
664 { 660 {
665 parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat; 661 parcel.landData.Flags |= (uint) ParcelFlags.AllowVoiceChat;
666 parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan; 662 parcel.landData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan;
667 ((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData); 663 ((Scene)newscene).LandChannel.UpdateLandObject(parcel.landData.LocalID, parcel.landData);
668 } 664 }
669 } 665 }
670 666
@@ -684,7 +680,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
684 680
685 response.Value = responseData; 681 response.Value = responseData;
686 } 682 }
687 683
688 m_log.Info("[RADMIN]: CreateRegion: request complete"); 684 m_log.Info("[RADMIN]: CreateRegion: request complete");
689 return response; 685 return response;
690 } 686 }
@@ -756,7 +752,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
756 return response; 752 return response;
757 } 753 }
758 } 754 }
759 755
760 /// <summary> 756 /// <summary>
761 /// Close a region. 757 /// Close a region.
762 /// <summary> 758 /// <summary>
@@ -798,7 +794,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
798 { 794 {
799 Hashtable requestData = (Hashtable) request.Params[0]; 795 Hashtable requestData = (Hashtable) request.Params[0];
800 checkStringParameters(request, new string[] {"password"}); 796 checkStringParameters(request, new string[] {"password"});
801 797
802 if (requestData.ContainsKey("region_id") && 798 if (requestData.ContainsKey("region_id") &&
803 !String.IsNullOrEmpty((string) requestData["region_id"])) 799 !String.IsNullOrEmpty((string) requestData["region_id"]))
804 { 800 {
@@ -899,8 +895,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
899 if (!m_app.SceneManager.TryGetScene(regionName, out scene)) 895 if (!m_app.SceneManager.TryGetScene(regionName, out scene))
900 throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); 896 throw new Exception(String.Format("region \"{0}\" does not exist", regionName));
901 897
902 // Modify access 898 // Modify access
903 scene.RegionInfo.EstateSettings.PublicAccess = 899 scene.RegionInfo.EstateSettings.PublicAccess =
904 getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); 900 getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess);
905 if (scene.RegionInfo.Persistent) 901 if (scene.RegionInfo.Persistent)
906 scene.RegionInfo.EstateSettings.Save(); 902 scene.RegionInfo.EstateSettings.Save();
@@ -988,8 +984,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
988 public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request, IPEndPoint remoteClient) 984 public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request, IPEndPoint remoteClient)
989 { 985 {
990 m_log.Info("[RADMIN]: CreateUser: new request"); 986 m_log.Info("[RADMIN]: CreateUser: new request");
991 987
992 //AnakinLohner 0.6.5-post-fixes
993 FailIfRemoteAdminDisabled("CreateUser"); 988 FailIfRemoteAdminDisabled("CreateUser");
994 989
995 XmlRpcResponse response = new XmlRpcResponse(); 990 XmlRpcResponse response = new XmlRpcResponse();
@@ -1024,13 +1019,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1024 if (requestData.Contains("user_email")) 1019 if (requestData.Contains("user_email"))
1025 email = (string)requestData["user_email"]; 1020 email = (string)requestData["user_email"];
1026 1021
1027 CachedUserInfo userInfo = 1022 CachedUserInfo userInfo =
1028 m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); 1023 m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
1029 1024
1030 if (null != userInfo) 1025 if (null != userInfo)
1031 throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname)); 1026 throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname));
1032 1027
1033 UUID userID = 1028 UUID userID =
1034 m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname, 1029 m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname,
1035 passwd, email, regX, regY); 1030 passwd, email, regX, regY);
1036 1031
@@ -1101,7 +1096,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1101 { 1096 {
1102 m_log.Info("[RADMIN]: UserExists: new request"); 1097 m_log.Info("[RADMIN]: UserExists: new request");
1103 1098
1104 //AnakinLohner 0.6.5-post-fixes
1105 FailIfRemoteAdminDisabled("UserExists"); 1099 FailIfRemoteAdminDisabled("UserExists");
1106 1100
1107 XmlRpcResponse response = new XmlRpcResponse(); 1101 XmlRpcResponse response = new XmlRpcResponse();
@@ -1117,8 +1111,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1117 string firstname = (string) requestData["user_firstname"]; 1111 string firstname = (string) requestData["user_firstname"];
1118 string lastname = (string) requestData["user_lastname"]; 1112 string lastname = (string) requestData["user_lastname"];
1119 1113
1120 CachedUserInfo userInfo 1114 CachedUserInfo userInfo
1121 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); 1115 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
1122 1116
1123 responseData["user_firstname"] = firstname; 1117 responseData["user_firstname"] = firstname;
1124 responseData["user_lastname"] = lastname; 1118 responseData["user_lastname"] = lastname;
@@ -1131,10 +1125,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1131 else 1125 else
1132 { 1126 {
1133 responseData["success"] = true; 1127 responseData["success"] = true;
1134 responseData["lastlogin"] = userInfo.UserProfile.LastLogin; 1128 responseData["lastlogin"] = userInfo.UserProfile.LastLogin;
1135 } 1129 }
1136 1130
1137
1138 response.Value = responseData; 1131 response.Value = responseData;
1139 } 1132 }
1140 catch (Exception e) 1133 catch (Exception e)
@@ -1252,7 +1245,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1252 if (requestData.ContainsKey("about_virtual_world")) 1245 if (requestData.ContainsKey("about_virtual_world"))
1253 aboutAvatar = (string)requestData["about_virtual_world"]; 1246 aboutAvatar = (string)requestData["about_virtual_world"];
1254 1247
1255 UserProfileData userProfile 1248 UserProfileData userProfile
1256 = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); 1249 = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname);
1257 1250
1258 if (null == userProfile) 1251 if (null == userProfile)
@@ -1308,20 +1301,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1308 1301
1309 m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); 1302 m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
1310 return response; 1303 return response;
1311
1312 } 1304 }
1313 1305
1314 /// <summary> 1306 /// <summary>
1315 /// This method is called by the user-create and user-modify methods to establish 1307 /// This method is called by the user-create and user-modify methods to establish
1316 /// or change, the user's appearance. Default avatar names can be specified via 1308 /// or change, the user's appearance. Default avatar names can be specified via
1317 /// the config file, but must correspond to avatars in the default appearance 1309 /// the config file, but must correspond to avatars in the default appearance
1318 /// file, or pre-existing in the user database. 1310 /// file, or pre-existing in the user database.
1319 /// This should probably get moved into somewhere more core eventually. 1311 /// This should probably get moved into somewhere more core eventually.
1320 /// </summary> 1312 /// </summary>
1321 1313
1322 private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) 1314 private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid)
1323 { 1315 {
1324
1325 m_log.DebugFormat("[RADMIN] updateUserAppearance"); 1316 m_log.DebugFormat("[RADMIN] updateUserAppearance");
1326 1317
1327 string dmale = m_config.GetString("default_male", "Default Male"); 1318 string dmale = m_config.GetString("default_male", "Default Male");
@@ -1347,7 +1338,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1347 break; 1338 break;
1348 } 1339 }
1349 } 1340 }
1350 1341
1351 // Has an explicit model been specified? 1342 // Has an explicit model been specified?
1352 1343
1353 if (requestData.Contains("model")) 1344 if (requestData.Contains("model"))
@@ -1384,7 +1375,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1384 return; 1375 return;
1385 } 1376 }
1386 1377
1387 // Set current user's appearance. This bit is easy. The appearance structure is populated with 1378 // Set current user's appearance. This bit is easy. The appearance structure is populated with
1388 // actual asset ids, however to complete the magic we need to populate the inventory with the 1379 // actual asset ids, however to complete the magic we need to populate the inventory with the
1389 // assets in question. 1380 // assets in question.
1390 1381
@@ -1393,7 +1384,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1393 m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", 1384 m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}",
1394 userid, model); 1385 userid, model);
1395 } 1386 }
1396 1387
1397 /// <summary> 1388 /// <summary>
1398 /// This method is called by updateAvatarAppearance once any specified model has been 1389 /// This method is called by updateAvatarAppearance once any specified model has been
1399 /// ratified, or an appropriate default value has been adopted. The intended prototype 1390 /// ratified, or an appropriate default value has been adopted. The intended prototype
@@ -1402,19 +1393,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1402 1393
1403 private void establishAppearance(UUID dest, UUID srca) 1394 private void establishAppearance(UUID dest, UUID srca)
1404 { 1395 {
1405
1406 m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); 1396 m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca);
1407 1397
1408 AvatarAppearance ava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(srca); 1398 AvatarAppearance ava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(srca);
1409 1399
1410 // If the model has no associated appearance we're done. 1400 // If the model has no associated appearance we're done.
1411 1401
1412 // if (ava == null) 1402 // if (ava == null)
1413 // { 1403 // {
1414 // return new AvatarAppearance(); 1404 // return new AvatarAppearance();
1415 // } 1405 // }
1416 1406
1417 if (ava == null) 1407 if (ava == null)
1418 return; 1408 return;
1419 1409
1420 UICallback sic = new UICallback(); 1410 UICallback sic = new UICallback();
@@ -1423,7 +1413,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1423 1413
1424 try 1414 try
1425 { 1415 {
1426
1427 Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>(); 1416 Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>();
1428 1417
1429 iserv.GetUserInventory(dest, dic.callback); 1418 iserv.GetUserInventory(dest, dic.callback);
@@ -1434,7 +1423,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1434 1423
1435 if (sic.OK && dic.OK) 1424 if (sic.OK && dic.OK)
1436 { 1425 {
1437
1438 InventoryFolderImpl efolder; 1426 InventoryFolderImpl efolder;
1439 InventoryFolderImpl srcf = sic.root.FindFolderForType(5); 1427 InventoryFolderImpl srcf = sic.root.FindFolderForType(5);
1440 InventoryFolderImpl dstf = dic.root.FindFolderForType(5); 1428 InventoryFolderImpl dstf = dic.root.FindFolderForType(5);
@@ -1460,7 +1448,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1460 if (item.Folder == folder.ID) 1448 if (item.Folder == folder.ID)
1461 { 1449 {
1462 InventoryItemBase dsti = new InventoryItemBase(); 1450 InventoryItemBase dsti = new InventoryItemBase();
1463 dsti.ID = UUID.Random(); 1451 dsti.ID = UUID.Random();
1464 dsti.Name = item.Name; 1452 dsti.Name = item.Name;
1465 dsti.Description = item.Description; 1453 dsti.Description = item.Description;
1466 dsti.InvType = item.InvType; 1454 dsti.InvType = item.InvType;
@@ -1494,7 +1482,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1494 ava.SetWearable(i, dw); 1482 ava.SetWearable(i, dw);
1495 } 1483 }
1496 } 1484 }
1497
1498 } 1485 }
1499 else 1486 else
1500 { 1487 {
@@ -1502,7 +1489,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1502 } 1489 }
1503 1490
1504 m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava); 1491 m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava);
1505
1506 } 1492 }
1507 catch (Exception e) 1493 catch (Exception e)
1508 { 1494 {
@@ -1510,16 +1496,15 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1510 dest, e.Message); 1496 dest, e.Message);
1511 return; 1497 return;
1512 } 1498 }
1513
1514 return;
1515 1499
1500 return;
1516 } 1501 }
1517 1502
1518 ///<summary> 1503 ///<summary>
1519 /// This method is called if a given model avatar name can not be found. If the external 1504 /// This method is called if a given model avatar name can not be found. If the external
1520 /// file has already been loaded once, then control returns immediately. If not, then it 1505 /// file has already been loaded once, then control returns immediately. If not, then it
1521 /// looks for a default appearance file. This file contains XML definitions of zero or more named 1506 /// looks for a default appearance file. This file contains XML definitions of zero or more named
1522 /// avatars, each avatar can specify zero or more "outfits". Each outfit is a collection 1507 /// avatars, each avatar can specify zero or more "outfits". Each outfit is a collection
1523 /// of items that together, define a particular ensemble for the avatar. Each avatar should 1508 /// of items that together, define a particular ensemble for the avatar. Each avatar should
1524 /// indicate which outfit is the default, and this outfit will be automatically worn. The 1509 /// indicate which outfit is the default, and this outfit will be automatically worn. The
1525 /// other outfits are provided to allow "real" avatars a way to easily change their outfits. 1510 /// other outfits are provided to allow "real" avatars a way to easily change their outfits.
@@ -1527,7 +1512,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1527 1512
1528 private bool createDefaultAvatars() 1513 private bool createDefaultAvatars()
1529 { 1514 {
1530
1531 // Only load once 1515 // Only load once
1532 1516
1533 if (daload) 1517 if (daload)
@@ -1543,10 +1527,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1543 1527
1544 try 1528 try
1545 { 1529 {
1546
1547 string dafn = null; 1530 string dafn = null;
1548 1531
1549 //AnakinLohner 0.6.5-post-fixes
1550 //m_config may be null if RemoteAdmin configuration secition is missing or disabled in OpenSim.ini 1532 //m_config may be null if RemoteAdmin configuration secition is missing or disabled in OpenSim.ini
1551 if (m_config != null) 1533 if (m_config != null)
1552 { 1534 {
@@ -1555,7 +1537,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1555 1537
1556 if (File.Exists(dafn)) 1538 if (File.Exists(dafn))
1557 { 1539 {
1558
1559 XmlDocument doc = new XmlDocument(); 1540 XmlDocument doc = new XmlDocument();
1560 string name = "*unknown*"; 1541 string name = "*unknown*";
1561 string email = "anon@anon"; 1542 string email = "anon@anon";
@@ -1630,12 +1611,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1630 } 1611 }
1631 1612
1632 m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID); 1613 m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID);
1633 include = true; 1614 include = true;
1634 } 1615 }
1635 catch (Exception e) 1616 catch (Exception e)
1636 { 1617 {
1637 m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message); 1618 m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message);
1638 include = false; 1619 include = false;
1639 } 1620 }
1640 1621
1641 // OK, User has been created OK, now we can install the inventory. 1622 // OK, User has been created OK, now we can install the inventory.
@@ -1654,7 +1635,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1654 { 1635 {
1655 mava = new AvatarAppearance(); 1636 mava = new AvatarAppearance();
1656 } 1637 }
1657 1638
1658 { 1639 {
1659 AvatarWearable[] wearables = mava.Wearables; 1640 AvatarWearable[] wearables = mava.Wearables;
1660 for (int i=0; i<wearables.Length; i++) 1641 for (int i=0; i<wearables.Length; i++)
@@ -1670,8 +1651,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1670 if (uic.OK) 1651 if (uic.OK)
1671 try 1652 try
1672 { 1653 {
1673 1654 m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory",
1674 m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory",
1675 uic.folders.Count, uic.items.Count); 1655 uic.folders.Count, uic.items.Count);
1676 1656
1677 InventoryFolderImpl cfolder = uic.root.FindFolderForType(5); 1657 InventoryFolderImpl cfolder = uic.root.FindFolderForType(5);
@@ -1699,7 +1679,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1699 1679
1700 foreach (XmlElement outfit in outfits) 1680 foreach (XmlElement outfit in outfits)
1701 { 1681 {
1702
1703 m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}", 1682 m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}",
1704 GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?")); 1683 GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?"));
1705 1684
@@ -1707,7 +1686,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1707 select = (GetStringAttribute(outfit,"default","no") == "yes"); 1686 select = (GetStringAttribute(outfit,"default","no") == "yes");
1708 efolder = null; 1687 efolder = null;
1709 1688
1710 // If the folder already exists, re-use it. The defaults may 1689 // If the folder already exists, re-use it. The defaults may
1711 // change over time. Augment only. 1690 // change over time. Augment only.
1712 foreach (InventoryFolderImpl folder in uic.folders) 1691 foreach (InventoryFolderImpl folder in uic.folders)
1713 { 1692 {
@@ -1756,10 +1735,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1756 1735
1757 InventoryItemBase iitem = null; 1736 InventoryItemBase iitem = null;
1758 1737
1759 if ((iitem = efolder.FindAsset(assetid)) == null) 1738 if ((iitem = efolder.FindAsset(assetid)) == null)
1760 { 1739 {
1761 iitem = new InventoryItemBase(); 1740 iitem = new InventoryItemBase();
1762 iitem.ID = UUID.Random(); 1741 iitem.ID = UUID.Random();
1763 iitem.Name = GetStringAttribute(item,"name",""); 1742 iitem.Name = GetStringAttribute(item,"name","");
1764 iitem.Description = GetStringAttribute(item,"desc",""); 1743 iitem.Description = GetStringAttribute(item,"desc","");
1765 iitem.InvType = GetIntegerAttribute(item,"invtype",-1); 1744 iitem.InvType = GetIntegerAttribute(item,"invtype",-1);
@@ -1820,9 +1799,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1820 } 1799 }
1821 1800
1822 return true; 1801 return true;
1823
1824 } 1802 }
1825 1803
1826 /// <summary> 1804 /// <summary>
1827 /// Load an OAR file into a region.. 1805 /// Load an OAR file into a region..
1828 /// <summary> 1806 /// <summary>
@@ -1859,9 +1837,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1859 { 1837 {
1860 m_log.Info("[RADMIN]: Received Load OAR Administrator Request"); 1838 m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
1861 1839
1862 //AnakinLohner 0.6.5-post-fixes
1863 FailIfRemoteAdminDisabled("Load OAR"); 1840 FailIfRemoteAdminDisabled("Load OAR");
1864 1841
1865 XmlRpcResponse response = new XmlRpcResponse(); 1842 XmlRpcResponse response = new XmlRpcResponse();
1866 Hashtable responseData = new Hashtable(); 1843 Hashtable responseData = new Hashtable();
1867 1844
@@ -1962,9 +1939,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1962 { 1939 {
1963 m_log.Info("[RADMIN]: Received Save OAR Administrator Request"); 1940 m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
1964 1941
1965 //AnakinLohner 0.6.5-post-fixes
1966 FailIfRemoteAdminDisabled("Save OAR"); 1942 FailIfRemoteAdminDisabled("Save OAR");
1967 1943
1968 XmlRpcResponse response = new XmlRpcResponse(); 1944 XmlRpcResponse response = new XmlRpcResponse();
1969 Hashtable responseData = new Hashtable(); 1945 Hashtable responseData = new Hashtable();
1970 1946
@@ -2003,7 +1979,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2003 1979
2004 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>(); 1980 IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
2005 1981
2006
2007 if (archiver != null) 1982 if (archiver != null)
2008 { 1983 {
2009 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; 1984 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
@@ -2014,11 +1989,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2014 else 1989 else
2015 throw new Exception("Archiver module not present for scene"); 1990 throw new Exception("Archiver module not present for scene");
2016 1991
2017
2018 responseData["saved"] = true; 1992 responseData["saved"] = true;
2019 1993
2020 response.Value = responseData; 1994 response.Value = responseData;
2021
2022 } 1995 }
2023 catch (Exception e) 1996 catch (Exception e)
2024 { 1997 {
@@ -2045,7 +2018,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2045 { 2018 {
2046 m_log.Info("[RADMIN]: Received Load XML Administrator Request"); 2019 m_log.Info("[RADMIN]: Received Load XML Administrator Request");
2047 2020
2048 //AnakinLohner 0.6.5-post-fixes
2049 FailIfRemoteAdminDisabled("Load XML"); 2021 FailIfRemoteAdminDisabled("Load XML");
2050 2022
2051 XmlRpcResponse response = new XmlRpcResponse(); 2023 XmlRpcResponse response = new XmlRpcResponse();
@@ -2129,12 +2101,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2129 } 2101 }
2130 } 2102 }
2131 2103
2132
2133 public XmlRpcResponse XmlRpcSaveXMLMethod(XmlRpcRequest request, IPEndPoint remoteClient) 2104 public XmlRpcResponse XmlRpcSaveXMLMethod(XmlRpcRequest request, IPEndPoint remoteClient)
2134 { 2105 {
2135 m_log.Info("[RADMIN]: Received Save XML Administrator Request"); 2106 m_log.Info("[RADMIN]: Received Save XML Administrator Request");
2136 2107
2137 //AnakinLohner 0.6.5-post-fixes
2138 FailIfRemoteAdminDisabled("Save XML"); 2108 FailIfRemoteAdminDisabled("Save XML");
2139 2109
2140 XmlRpcResponse response = new XmlRpcResponse(); 2110 XmlRpcResponse response = new XmlRpcResponse();
@@ -2220,7 +2190,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2220 { 2190 {
2221 m_log.Info("[RADMIN]: Received Query XML Administrator Request"); 2191 m_log.Info("[RADMIN]: Received Query XML Administrator Request");
2222 2192
2223 //AnakinLohner 0.6.5-post-fixes
2224 FailIfRemoteAdminDisabled("Query XML"); 2193 FailIfRemoteAdminDisabled("Query XML");
2225 2194
2226 XmlRpcResponse response = new XmlRpcResponse(); 2195 XmlRpcResponse response = new XmlRpcResponse();
@@ -2255,9 +2224,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2255 else throw new Exception("neither region_name nor region_uuid given"); 2224 else throw new Exception("neither region_name nor region_uuid given");
2256 2225
2257 Scene s = m_app.SceneManager.CurrentScene; 2226 Scene s = m_app.SceneManager.CurrentScene;
2258
2259 int health = s.GetHealth(); 2227 int health = s.GetHealth();
2260
2261 responseData["health"] = health; 2228 responseData["health"] = health;
2262 2229
2263 response.Value = responseData; 2230 response.Value = responseData;
@@ -2280,7 +2247,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2280 { 2247 {
2281 m_log.Info("[RADMIN]: Received Command XML Administrator Request"); 2248 m_log.Info("[RADMIN]: Received Command XML Administrator Request");
2282 2249
2283 //AnakinLohner 0.6.5-post-fixes
2284 FailIfRemoteAdminDisabled("Command XML"); 2250 FailIfRemoteAdminDisabled("Command XML");
2285 2251
2286 XmlRpcResponse response = new XmlRpcResponse(); 2252 XmlRpcResponse response = new XmlRpcResponse();
@@ -2320,12 +2286,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2320 2286
2321 public XmlRpcResponse XmlRpcAccessListClear(XmlRpcRequest request, IPEndPoint remoteClient) 2287 public XmlRpcResponse XmlRpcAccessListClear(XmlRpcRequest request, IPEndPoint remoteClient)
2322 { 2288 {
2323
2324 m_log.Info("[RADMIN]: Received Access List Clear Request"); 2289 m_log.Info("[RADMIN]: Received Access List Clear Request");
2325 2290
2326 //AnakinLohner 0.6.5-post-fixes
2327 FailIfRemoteAdminDisabled("Access List Clear"); 2291 FailIfRemoteAdminDisabled("Access List Clear");
2328 2292
2329 XmlRpcResponse response = new XmlRpcResponse(); 2293 XmlRpcResponse response = new XmlRpcResponse();
2330 Hashtable responseData = new Hashtable(); 2294 Hashtable responseData = new Hashtable();
2331 2295
@@ -2360,7 +2324,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2360 s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; 2324 s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{};
2361 if (s.RegionInfo.Persistent) 2325 if (s.RegionInfo.Persistent)
2362 s.RegionInfo.EstateSettings.Save(); 2326 s.RegionInfo.EstateSettings.Save();
2363
2364 } 2327 }
2365 catch (Exception e) 2328 catch (Exception e)
2366 { 2329 {
@@ -2368,7 +2331,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2368 2331
2369 responseData["success"] = false; 2332 responseData["success"] = false;
2370 responseData["error"] = e.Message; 2333 responseData["error"] = e.Message;
2371
2372 } 2334 }
2373 finally 2335 finally
2374 { 2336 {
@@ -2381,12 +2343,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2381 2343
2382 public XmlRpcResponse XmlRpcAccessListAdd(XmlRpcRequest request, IPEndPoint remoteClient) 2344 public XmlRpcResponse XmlRpcAccessListAdd(XmlRpcRequest request, IPEndPoint remoteClient)
2383 { 2345 {
2384
2385 m_log.Info("[RADMIN]: Received Access List Add Request"); 2346 m_log.Info("[RADMIN]: Received Access List Add Request");
2386 2347
2387 //AnakinLohner 0.6.5-post-fixes
2388 FailIfRemoteAdminDisabled("Access List Add"); 2348 FailIfRemoteAdminDisabled("Access List Add");
2389 2349
2390 XmlRpcResponse response = new XmlRpcResponse(); 2350 XmlRpcResponse response = new XmlRpcResponse();
2391 Hashtable responseData = new Hashtable(); 2351 Hashtable responseData = new Hashtable();
2392 2352
@@ -2419,7 +2379,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2419 2379
2420 int addk = 0; 2380 int addk = 0;
2421 2381
2422 if (requestData.Contains("users")) 2382 if (requestData.Contains("users"))
2423 { 2383 {
2424 UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService; 2384 UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService;
2425 Scene s = m_app.SceneManager.CurrentScene; 2385 Scene s = m_app.SceneManager.CurrentScene;
@@ -2450,7 +2410,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2450 } 2410 }
2451 2411
2452 responseData["added"] = addk; 2412 responseData["added"] = addk;
2453
2454 } 2413 }
2455 catch (Exception e) 2414 catch (Exception e)
2456 { 2415 {
@@ -2458,7 +2417,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2458 2417
2459 responseData["success"] = false; 2418 responseData["success"] = false;
2460 responseData["error"] = e.Message; 2419 responseData["error"] = e.Message;
2461
2462 } 2420 }
2463 finally 2421 finally
2464 { 2422 {
@@ -2471,12 +2429,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2471 2429
2472 public XmlRpcResponse XmlRpcAccessListRemove(XmlRpcRequest request, IPEndPoint remoteClient) 2430 public XmlRpcResponse XmlRpcAccessListRemove(XmlRpcRequest request, IPEndPoint remoteClient)
2473 { 2431 {
2474
2475 m_log.Info("[RADMIN]: Received Access List Remove Request"); 2432 m_log.Info("[RADMIN]: Received Access List Remove Request");
2476 2433
2477 //AnakinLohner 0.6.5-post-fixes
2478 FailIfRemoteAdminDisabled("Access List Remove"); 2434 FailIfRemoteAdminDisabled("Access List Remove");
2479 2435
2480 XmlRpcResponse response = new XmlRpcResponse(); 2436 XmlRpcResponse response = new XmlRpcResponse();
2481 Hashtable responseData = new Hashtable(); 2437 Hashtable responseData = new Hashtable();
2482 2438
@@ -2509,7 +2465,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2509 2465
2510 int remk = 0; 2466 int remk = 0;
2511 2467
2512 if (requestData.Contains("users")) 2468 if (requestData.Contains("users"))
2513 { 2469 {
2514 UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService; 2470 UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService;
2515 Scene s = m_app.SceneManager.CurrentScene; 2471 Scene s = m_app.SceneManager.CurrentScene;
@@ -2539,7 +2495,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2539 } 2495 }
2540 2496
2541 responseData["removed"] = remk; 2497 responseData["removed"] = remk;
2542
2543 } 2498 }
2544 catch (Exception e) 2499 catch (Exception e)
2545 { 2500 {
@@ -2547,7 +2502,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2547 2502
2548 responseData["success"] = false; 2503 responseData["success"] = false;
2549 responseData["error"] = e.Message; 2504 responseData["error"] = e.Message;
2550
2551 } 2505 }
2552 finally 2506 finally
2553 { 2507 {
@@ -2560,12 +2514,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2560 2514
2561 public XmlRpcResponse XmlRpcAccessListList(XmlRpcRequest request, IPEndPoint remoteClient) 2515 public XmlRpcResponse XmlRpcAccessListList(XmlRpcRequest request, IPEndPoint remoteClient)
2562 { 2516 {
2563
2564 m_log.Info("[RADMIN]: Received Access List List Request"); 2517 m_log.Info("[RADMIN]: Received Access List List Request");
2565 2518
2566 //AnakinLohner 0.6.5-post-fixes
2567 FailIfRemoteAdminDisabled("Access List List"); 2519 FailIfRemoteAdminDisabled("Access List List");
2568 2520
2569 XmlRpcResponse response = new XmlRpcResponse(); 2521 XmlRpcResponse response = new XmlRpcResponse();
2570 Hashtable responseData = new Hashtable(); 2522 Hashtable responseData = new Hashtable();
2571 2523
@@ -2608,9 +2560,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2608 users[user.ToString()] = udata.UserProfile.Name; 2560 users[user.ToString()] = udata.UserProfile.Name;
2609 } 2561 }
2610 } 2562 }
2611
2612 responseData["users"] = users;
2613 2563
2564 responseData["users"] = users;
2614 } 2565 }
2615 catch (Exception e) 2566 catch (Exception e)
2616 { 2567 {
@@ -2618,7 +2569,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2618 2569
2619 responseData["success"] = false; 2570 responseData["success"] = false;
2620 responseData["error"] = e.Message; 2571 responseData["error"] = e.Message;
2621
2622 } 2572 }
2623 finally 2573 finally
2624 { 2574 {
@@ -2695,12 +2645,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2695 public void Dispose() 2645 public void Dispose()
2696 { 2646 {
2697 } 2647 }
2698
2699 } 2648 }
2700 2649
2701 class UICallback 2650 class UICallback
2702 { 2651 {
2703
2704 private Object uilock = new Object(); 2652 private Object uilock = new Object();
2705 internal InventoryFolderImpl root = null; 2653 internal InventoryFolderImpl root = null;
2706 internal List<InventoryFolderImpl> folders; 2654 internal List<InventoryFolderImpl> folders;
@@ -2720,7 +2668,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2720 2668
2721 public void GetInventory() 2669 public void GetInventory()
2722 { 2670 {
2723
2724 Dictionary<UUID, InventoryFolderImpl> fmap = new Dictionary<UUID, InventoryFolderImpl>(); 2671 Dictionary<UUID, InventoryFolderImpl> fmap = new Dictionary<UUID, InventoryFolderImpl>();
2725 2672
2726 if (OK == false) 2673 if (OK == false)
@@ -2729,7 +2676,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2729 { 2676 {
2730 if (OK == false) 2677 if (OK == false)
2731 System.Threading.Monitor.Wait(uilock); 2678 System.Threading.Monitor.Wait(uilock);
2732 } 2679 }
2733 } 2680 }
2734 2681
2735 // Got the inventory OK. So now merge the content of the default appearance 2682 // Got the inventory OK. So now merge the content of the default appearance
@@ -2774,8 +2721,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2774 { 2721 {
2775 fmap[item.Folder].Items.Add(item.ID, item); 2722 fmap[item.Folder].Items.Add(item.ID, item);
2776 } 2723 }
2777
2778 } 2724 }
2779 } 2725 }
2780
2781} 2726}
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
index a407b9e..9c90a7e 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
@@ -218,7 +218,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
218 httpResponse.ContentType = "text/xml"; 218 httpResponse.ContentType = "text/xml";
219 219
220 IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); 220 IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
221 if (serialiser != null) 221 if (serialiser != null)
222 serialiser.SavePrimsToXml2(scene, new StreamWriter(httpResponse.OutputStream), min, max); 222 serialiser.SavePrimsToXml2(scene, new StreamWriter(httpResponse.OutputStream), min, max);
223 223
224 return ""; 224 return "";