aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs252
1 files changed, 163 insertions, 89 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 1b4d1ea..5a011ce 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -94,7 +94,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
94 94
95 public void Initialise() 95 public void Initialise()
96 { 96 {
97 m_log.Info("[RADMIN]: " + Name + " cannot be default-initialized!"); 97 m_log.Error("[RADMIN]: " + Name + " cannot be default-initialized!");
98 throw new PluginNotInitialisedException(Name); 98 throw new PluginNotInitialisedException(Name);
99 } 99 }
100 100
@@ -111,7 +111,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
111 else 111 else
112 { 112 {
113 m_config = m_configSource.Configs["RemoteAdmin"]; 113 m_config = m_configSource.Configs["RemoteAdmin"];
114 m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); 114 m_log.Debug("[RADMIN]: Remote Admin Plugin Enabled");
115 m_requiredPassword = m_config.GetString("access_password", String.Empty); 115 m_requiredPassword = m_config.GetString("access_password", String.Empty);
116 int port = m_config.GetInt("port", 0); 116 int port = m_config.GetInt("port", 0);
117 117
@@ -130,6 +130,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
130 availableMethods["admin_broadcast"] = XmlRpcAlertMethod; 130 availableMethods["admin_broadcast"] = XmlRpcAlertMethod;
131 availableMethods["admin_restart"] = XmlRpcRestartMethod; 131 availableMethods["admin_restart"] = XmlRpcRestartMethod;
132 availableMethods["admin_load_heightmap"] = XmlRpcLoadHeightmapMethod; 132 availableMethods["admin_load_heightmap"] = XmlRpcLoadHeightmapMethod;
133 availableMethods["admin_save_heightmap"] = XmlRpcSaveHeightmapMethod;
133 // User management 134 // User management
134 availableMethods["admin_create_user"] = XmlRpcCreateUserMethod; 135 availableMethods["admin_create_user"] = XmlRpcCreateUserMethod;
135 availableMethods["admin_create_user_email"] = XmlRpcCreateUserMethod; 136 availableMethods["admin_create_user_email"] = XmlRpcCreateUserMethod;
@@ -230,8 +231,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
230 } 231 }
231 catch (Exception e) 232 catch (Exception e)
232 { 233 {
233 m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0}", e.Message); 234 m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0} {1}", e.Message, e.StackTrace);
234 m_log.DebugFormat("[RADMIN]: Restart region: failed: {0}", e.ToString());
235 responseData["accepted"] = false; 235 responseData["accepted"] = false;
236 responseData["success"] = false; 236 responseData["success"] = false;
237 responseData["rebooting"] = false; 237 responseData["rebooting"] = false;
@@ -277,8 +277,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
277 } 277 }
278 catch (Exception e) 278 catch (Exception e)
279 { 279 {
280 m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message); 280 m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message, e.StackTrace);
281 m_log.DebugFormat("[RADMIN]: Broadcasting: failed: {0}", e.ToString());
282 281
283 responseData["accepted"] = false; 282 responseData["accepted"] = false;
284 responseData["success"] = false; 283 responseData["success"] = false;
@@ -301,7 +300,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
301 { 300 {
302 Hashtable requestData = (Hashtable) request.Params[0]; 301 Hashtable requestData = (Hashtable) request.Params[0];
303 302
304 m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString()); 303 m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request);
305 // foreach (string k in requestData.Keys) 304 // foreach (string k in requestData.Keys)
306 // { 305 // {
307 // m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}", 306 // m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}",
@@ -348,8 +347,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
348 } 347 }
349 catch (Exception e) 348 catch (Exception e)
350 { 349 {
351 m_log.ErrorFormat("[RADMIN]: Terrain Loading: failed: {0}", e.Message); 350 m_log.ErrorFormat("[RADMIN]: Terrain Loading: failed: {0} {1}", e.Message, e.StackTrace);
352 m_log.DebugFormat("[RADMIN]: Terrain Loading: failed: {0}", e.ToString());
353 351
354 responseData["success"] = false; 352 responseData["success"] = false;
355 responseData["error"] = e.Message; 353 responseData["error"] = e.Message;
@@ -360,6 +358,61 @@ namespace OpenSim.ApplicationPlugins.RemoteController
360 return response; 358 return response;
361 } 359 }
362 360
361 public XmlRpcResponse XmlRpcSaveHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient)
362
363 {
364 XmlRpcResponse response = new XmlRpcResponse();
365 Hashtable responseData = new Hashtable();
366
367 m_log.Info("[RADMIN]: Save height maps request started");
368
369 try
370 {
371 Hashtable requestData = (Hashtable)request.Params[0];
372
373 m_log.DebugFormat("[RADMIN]: Save Terrain: XmlRpc {0}", request.ToString());
374
375 CheckStringParameters(request, new string[] { "password", "filename", "regionid" });
376
377 if (m_requiredPassword != String.Empty &&
378 (!requestData.Contains("password") || (string)requestData["password"] != m_requiredPassword))
379 throw new Exception("wrong password");
380
381 string file = (string)requestData["filename"];
382 UUID regionID = (UUID)(string)requestData["regionid"];
383 m_log.InfoFormat("[RADMIN]: Terrain Saving: {0}", file);
384
385 responseData["accepted"] = true;
386
387 Scene region = null;
388
389 if (!m_application.SceneManager.TryGetScene(regionID, out region))
390 throw new Exception("1: unable to get a scene with that name");
391
392 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
393 if (null == terrainModule) throw new Exception("terrain module not available");
394
395 terrainModule.SaveToFile(file);
396
397 responseData["success"] = false;
398
399 response.Value = responseData;
400 }
401 catch (Exception e)
402 {
403 m_log.ErrorFormat("[RADMIN]: Terrain Saving: failed: {0}", e.Message);
404 m_log.DebugFormat("[RADMIN]: Terrain Saving: failed: {0}", e.ToString());
405
406 responseData["success"] = false;
407 responseData["error"] = e.Message;
408
409 }
410
411 m_log.Info("[RADMIN]: Save height maps request complete");
412
413 return response;
414 }
415
363 public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request, IPEndPoint remoteClient) 416 public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request, IPEndPoint remoteClient)
364 { 417 {
365 m_log.Info("[RADMIN]: Received Shutdown Administrator Request"); 418 m_log.Info("[RADMIN]: Received Shutdown Administrator Request");
@@ -417,14 +470,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
417 } 470 }
418 catch (Exception e) 471 catch (Exception e)
419 { 472 {
420 m_log.ErrorFormat("[RADMIN] Shutdown: failed: {0}", e.Message); 473 m_log.ErrorFormat("[RADMIN]: Shutdown: failed: {0} {1}", e.Message, e.StackTrace);
421 m_log.DebugFormat("[RADMIN] Shutdown: failed: {0}", e.ToString());
422 474
423 responseData["accepted"] = false; 475 responseData["accepted"] = false;
424 responseData["error"] = e.Message; 476 responseData["error"] = e.Message;
425 477
426 response.Value = responseData; 478 response.Value = responseData;
427 } 479 }
480
428 m_log.Info("[RADMIN]: Shutdown Administrator Request complete"); 481 m_log.Info("[RADMIN]: Shutdown Administrator Request complete");
429 return response; 482 return response;
430 } 483 }
@@ -725,8 +778,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
725 } 778 }
726 catch (Exception e) 779 catch (Exception e)
727 { 780 {
728 m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0}", e.Message); 781 m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0} {1}", e.Message, e.StackTrace);
729 m_log.DebugFormat("[RADMIN] CreateRegion: failed {0}", e.ToString());
730 782
731 responseData["success"] = false; 783 responseData["success"] = false;
732 responseData["error"] = e.Message; 784 responseData["error"] = e.Message;
@@ -792,8 +844,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
792 } 844 }
793 catch (Exception e) 845 catch (Exception e)
794 { 846 {
795 m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0}", e.Message); 847 m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0} {1}", e.Message, e.StackTrace);
796 m_log.DebugFormat("[RADMIN] DeleteRegion: failed {0}", e.ToString());
797 848
798 responseData["success"] = false; 849 responseData["success"] = false;
799 responseData["error"] = e.Message; 850 responseData["error"] = e.Message;
@@ -884,8 +935,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
884 } 935 }
885 catch (Exception e) 936 catch (Exception e)
886 { 937 {
887 m_log.ErrorFormat("[RADMIN] CloseRegion: failed {0}", e.Message); 938 m_log.ErrorFormat("[RADMIN]: CloseRegion: failed {0} {1}", e.Message, e.StackTrace);
888 m_log.DebugFormat("[RADMIN] CloseRegion: failed {0}", e.ToString());
889 939
890 responseData["success"] = false; 940 responseData["success"] = false;
891 responseData["error"] = e.Message; 941 responseData["error"] = e.Message;
@@ -982,8 +1032,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
982 } 1032 }
983 catch (Exception e) 1033 catch (Exception e)
984 { 1034 {
985 m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0}", e.Message); 1035 m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0} {1}", e.Message, e.StackTrace);
986 m_log.DebugFormat("[RADMIN] ModifyRegion: failed {0}", e.ToString());
987 1036
988 responseData["success"] = false; 1037 responseData["success"] = false;
989 responseData["error"] = e.Message; 1038 responseData["error"] = e.Message;
@@ -1106,8 +1155,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1106 } 1155 }
1107 catch (Exception e) 1156 catch (Exception e)
1108 { 1157 {
1109 m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message); 1158 m_log.ErrorFormat("[RADMIN]: CreateUser: failed: {0} {1}", e.Message, e.StackTrace);
1110 m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString());
1111 1159
1112 responseData["success"] = false; 1160 responseData["success"] = false;
1113 responseData["avatar_uuid"] = UUID.Zero.ToString(); 1161 responseData["avatar_uuid"] = UUID.Zero.ToString();
@@ -1198,8 +1246,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1198 } 1246 }
1199 catch (Exception e) 1247 catch (Exception e)
1200 { 1248 {
1201 m_log.ErrorFormat("[RADMIN] UserExists: failed: {0}", e.Message); 1249 m_log.ErrorFormat("[RADMIN]: UserExists: failed: {0} {1}", e.Message, e.StackTrace);
1202 m_log.DebugFormat("[RADMIN] UserExists: failed: {0}", e.ToString());
1203 1250
1204 responseData["success"] = false; 1251 responseData["success"] = false;
1205 responseData["error"] = e.Message; 1252 responseData["error"] = e.Message;
@@ -1372,9 +1419,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1372 } 1419 }
1373 catch (Exception e) 1420 catch (Exception e)
1374 { 1421 {
1375 1422 m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0} {1}", e.Message, e.StackTrace);
1376 m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.Message);
1377 m_log.DebugFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.ToString());
1378 1423
1379 responseData["success"] = false; 1424 responseData["success"] = false;
1380 responseData["avatar_uuid"] = UUID.Zero.ToString(); 1425 responseData["avatar_uuid"] = UUID.Zero.ToString();
@@ -1382,6 +1427,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1382 1427
1383 response.Value = responseData; 1428 response.Value = responseData;
1384 } 1429 }
1430
1385 m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); 1431 m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
1386 return response; 1432 return response;
1387 } 1433 }
@@ -1397,7 +1443,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1397 1443
1398 private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) 1444 private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid)
1399 { 1445 {
1400 m_log.DebugFormat("[RADMIN] updateUserAppearance"); 1446 m_log.DebugFormat("[RADMIN]: updateUserAppearance");
1401 1447
1402 string defaultMale = m_config.GetString("default_male", "Default Male"); 1448 string defaultMale = m_config.GetString("default_male", "Default Male");
1403 string defaultFemale = m_config.GetString("default_female", "Default Female"); 1449 string defaultFemale = m_config.GetString("default_female", "Default Female");
@@ -1437,16 +1483,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1437 1483
1438 if (String.IsNullOrEmpty(model)) 1484 if (String.IsNullOrEmpty(model))
1439 { 1485 {
1440 m_log.DebugFormat("[RADMIN] Appearance update not requested"); 1486 m_log.DebugFormat("[RADMIN]: Appearance update not requested");
1441 return; 1487 return;
1442 } 1488 }
1443 1489
1444 m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model <{1}>", userid, model); 1490 m_log.DebugFormat("[RADMIN]: Setting appearance for avatar {0}, using model <{1}>", userid, model);
1445 1491
1446 string[] modelSpecifiers = model.Split(); 1492 string[] modelSpecifiers = model.Split();
1447 if (modelSpecifiers.Length != 2) 1493 if (modelSpecifiers.Length != 2)
1448 { 1494 {
1449 m_log.WarnFormat("[RADMIN] User appearance not set for {0}. Invalid model name : <{1}>", userid, model); 1495 m_log.WarnFormat("[RADMIN]: User appearance not set for {0}. Invalid model name : <{1}>", userid, model);
1450 // modelSpecifiers = dmodel.Split(); 1496 // modelSpecifiers = dmodel.Split();
1451 return; 1497 return;
1452 } 1498 }
@@ -1457,7 +1503,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1457 1503
1458 if (modelProfile == null) 1504 if (modelProfile == null)
1459 { 1505 {
1460 m_log.WarnFormat("[RADMIN] Requested model ({0}) not found. Appearance unchanged", model); 1506 m_log.WarnFormat("[RADMIN]: Requested model ({0}) not found. Appearance unchanged", model);
1461 return; 1507 return;
1462 } 1508 }
1463 1509
@@ -1467,7 +1513,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1467 1513
1468 EstablishAppearance(userid, modelProfile.PrincipalID); 1514 EstablishAppearance(userid, modelProfile.PrincipalID);
1469 1515
1470 m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", 1516 m_log.DebugFormat("[RADMIN]: Finished setting appearance for avatar {0}, using model {1}",
1471 userid, model); 1517 userid, model);
1472 } 1518 }
1473 1519
@@ -1479,7 +1525,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1479 1525
1480 private void EstablishAppearance(UUID destination, UUID source) 1526 private void EstablishAppearance(UUID destination, UUID source)
1481 { 1527 {
1482 m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", destination, source); 1528 m_log.DebugFormat("[RADMIN]: Initializing inventory for {0} from {1}", destination, source);
1483 Scene scene = m_application.SceneManager.CurrentOrFirstScene; 1529 Scene scene = m_application.SceneManager.CurrentOrFirstScene;
1484 1530
1485 // If the model has no associated appearance we're done. 1531 // If the model has no associated appearance we're done.
@@ -1501,7 +1547,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1501 } 1547 }
1502 catch (Exception e) 1548 catch (Exception e)
1503 { 1549 {
1504 m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}", 1550 m_log.WarnFormat("[RADMIN]: Error transferring appearance for {0} : {1}",
1505 destination, e.Message); 1551 destination, e.Message);
1506 } 1552 }
1507 1553
@@ -1532,7 +1578,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1532 } 1578 }
1533 catch (Exception e) 1579 catch (Exception e)
1534 { 1580 {
1535 m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}", 1581 m_log.WarnFormat("[RADMIN]: Error transferring appearance for {0} : {1}",
1536 destination, e.Message); 1582 destination, e.Message);
1537 } 1583 }
1538 1584
@@ -1567,7 +1613,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1567 destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; 1613 destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID;
1568 destinationFolder.Version = 1; 1614 destinationFolder.Version = 1;
1569 inventoryService.AddFolder(destinationFolder); // store base record 1615 inventoryService.AddFolder(destinationFolder); // store base record
1570 m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source); 1616 m_log.ErrorFormat("[RADMIN]: Created folder for destination {0}", source);
1571 } 1617 }
1572 1618
1573 // Wearables 1619 // Wearables
@@ -1587,6 +1633,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1587 { 1633 {
1588 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); 1634 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
1589 destinationItem.Name = item.Name; 1635 destinationItem.Name = item.Name;
1636 destinationItem.Owner = destination;
1590 destinationItem.Description = item.Description; 1637 destinationItem.Description = item.Description;
1591 destinationItem.InvType = item.InvType; 1638 destinationItem.InvType = item.InvType;
1592 destinationItem.CreatorId = item.CreatorId; 1639 destinationItem.CreatorId = item.CreatorId;
@@ -1606,6 +1653,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1606 destinationItem.Flags = item.Flags; 1653 destinationItem.Flags = item.Flags;
1607 destinationItem.CreationDate = item.CreationDate; 1654 destinationItem.CreationDate = item.CreationDate;
1608 destinationItem.Folder = destinationFolder.ID; 1655 destinationItem.Folder = destinationFolder.ID;
1656 ApplyNextOwnerPermissions(destinationItem);
1609 1657
1610 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); 1658 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
1611 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); 1659 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID);
@@ -1640,6 +1688,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1640 { 1688 {
1641 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); 1689 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
1642 destinationItem.Name = item.Name; 1690 destinationItem.Name = item.Name;
1691 destinationItem.Owner = destination;
1643 destinationItem.Description = item.Description; 1692 destinationItem.Description = item.Description;
1644 destinationItem.InvType = item.InvType; 1693 destinationItem.InvType = item.InvType;
1645 destinationItem.CreatorId = item.CreatorId; 1694 destinationItem.CreatorId = item.CreatorId;
@@ -1659,6 +1708,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1659 destinationItem.Flags = item.Flags; 1708 destinationItem.Flags = item.Flags;
1660 destinationItem.CreationDate = item.CreationDate; 1709 destinationItem.CreationDate = item.CreationDate;
1661 destinationItem.Folder = destinationFolder.ID; 1710 destinationItem.Folder = destinationFolder.ID;
1711 ApplyNextOwnerPermissions(destinationItem);
1662 1712
1663 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); 1713 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
1664 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); 1714 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID);
@@ -1716,13 +1766,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1716 { 1766 {
1717 destinationFolder = new InventoryFolderBase(); 1767 destinationFolder = new InventoryFolderBase();
1718 destinationFolder.ID = UUID.Random(); 1768 destinationFolder.ID = UUID.Random();
1719 destinationFolder.Name = assetType.ToString(); 1769 if (assetType == AssetType.Clothing) {
1770 destinationFolder.Name = "Clothing";
1771 } else {
1772 destinationFolder.Name = "Body Parts";
1773 }
1720 destinationFolder.Owner = destination; 1774 destinationFolder.Owner = destination;
1721 destinationFolder.Type = (short)assetType; 1775 destinationFolder.Type = (short)assetType;
1722 destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; 1776 destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID;
1723 destinationFolder.Version = 1; 1777 destinationFolder.Version = 1;
1724 inventoryService.AddFolder(destinationFolder); // store base record 1778 inventoryService.AddFolder(destinationFolder); // store base record
1725 m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source); 1779 m_log.ErrorFormat("[RADMIN]: Created folder for destination {0}", source);
1726 } 1780 }
1727 1781
1728 InventoryFolderBase extraFolder; 1782 InventoryFolderBase extraFolder;
@@ -1740,7 +1794,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1740 extraFolder.ParentID = destinationFolder.ID; 1794 extraFolder.ParentID = destinationFolder.ID;
1741 inventoryService.AddFolder(extraFolder); 1795 inventoryService.AddFolder(extraFolder);
1742 1796
1743 m_log.DebugFormat("[RADMIN] Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID); 1797 m_log.DebugFormat("[RADMIN]: Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID);
1744 1798
1745 List<InventoryItemBase> items = inventoryService.GetFolderContent(source, folder.ID).Items; 1799 List<InventoryItemBase> items = inventoryService.GetFolderContent(source, folder.ID).Items;
1746 1800
@@ -1748,6 +1802,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1748 { 1802 {
1749 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); 1803 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
1750 destinationItem.Name = item.Name; 1804 destinationItem.Name = item.Name;
1805 destinationItem.Owner = destination;
1751 destinationItem.Description = item.Description; 1806 destinationItem.Description = item.Description;
1752 destinationItem.InvType = item.InvType; 1807 destinationItem.InvType = item.InvType;
1753 destinationItem.CreatorId = item.CreatorId; 1808 destinationItem.CreatorId = item.CreatorId;
@@ -1767,6 +1822,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1767 destinationItem.Flags = item.Flags; 1822 destinationItem.Flags = item.Flags;
1768 destinationItem.CreationDate = item.CreationDate; 1823 destinationItem.CreationDate = item.CreationDate;
1769 destinationItem.Folder = extraFolder.ID; 1824 destinationItem.Folder = extraFolder.ID;
1825 ApplyNextOwnerPermissions(destinationItem);
1770 1826
1771 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); 1827 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
1772 inventoryMap.Add(item.ID, destinationItem.ID); 1828 inventoryMap.Add(item.ID, destinationItem.ID);
@@ -1784,6 +1840,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1784 } 1840 }
1785 1841
1786 /// <summary> 1842 /// <summary>
1843 /// Apply next owner permissions.
1844 /// </summary>
1845
1846 private void ApplyNextOwnerPermissions(InventoryItemBase item)
1847 {
1848 if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0)
1849 {
1850 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
1851 item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
1852 if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
1853 item.CurrentPermissions &= ~(uint)PermissionMask.Transfer;
1854 if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
1855 item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
1856 }
1857 item.CurrentPermissions &= item.NextPermissions;
1858 item.BasePermissions &= item.NextPermissions;
1859 item.EveryOnePermissions &= item.NextPermissions;
1860 // item.OwnerChanged = true;
1861 // item.PermsMask = 0;
1862 // item.PermsGranter = UUID.Zero;
1863 }
1864
1865 /// <summary>
1787 /// This method is called if a given model avatar name can not be found. If the external 1866 /// This method is called if a given model avatar name can not be found. If the external
1788 /// file has already been loaded once, then control returns immediately. If not, then it 1867 /// file has already been loaded once, then control returns immediately. If not, then it
1789 /// looks for a default appearance file. This file contains XML definitions of zero or more named 1868 /// looks for a default appearance file. This file contains XML definitions of zero or more named
@@ -1792,7 +1871,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1792 /// indicate which outfit is the default, and this outfit will be automatically worn. The 1871 /// indicate which outfit is the default, and this outfit will be automatically worn. The
1793 /// other outfits are provided to allow "real" avatars a way to easily change their outfits. 1872 /// other outfits are provided to allow "real" avatars a way to easily change their outfits.
1794 /// </summary> 1873 /// </summary>
1795
1796 private bool CreateDefaultAvatars() 1874 private bool CreateDefaultAvatars()
1797 { 1875 {
1798 // Only load once 1876 // Only load once
@@ -1801,7 +1879,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1801 return false; 1879 return false;
1802 } 1880 }
1803 1881
1804 m_log.DebugFormat("[RADMIN] Creating default avatar entries"); 1882 m_log.DebugFormat("[RADMIN]: Creating default avatar entries");
1805 1883
1806 m_defaultAvatarsLoaded = true; 1884 m_defaultAvatarsLoaded = true;
1807 1885
@@ -1857,7 +1935,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1857 1935
1858 foreach (XmlElement avatar in avatars) 1936 foreach (XmlElement avatar in avatars)
1859 { 1937 {
1860 m_log.DebugFormat("[RADMIN] Loading appearance for {0}, gender = {1}", 1938 m_log.DebugFormat("[RADMIN]: Loading appearance for {0}, gender = {1}",
1861 GetStringAttribute(avatar,"name","?"), GetStringAttribute(avatar,"gender","?")); 1939 GetStringAttribute(avatar,"name","?"), GetStringAttribute(avatar,"gender","?"));
1862 1940
1863 // Create the user identified by the avatar entry 1941 // Create the user identified by the avatar entry
@@ -1879,7 +1957,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1879 account = CreateUser(scopeID, names[0], names[1], password, email); 1957 account = CreateUser(scopeID, names[0], names[1], password, email);
1880 if (null == account) 1958 if (null == account)
1881 { 1959 {
1882 m_log.ErrorFormat("[RADMIN] Avatar {0} {1} was not created", names[0], names[1]); 1960 m_log.ErrorFormat("[RADMIN]: Avatar {0} {1} was not created", names[0], names[1]);
1883 return false; 1961 return false;
1884 } 1962 }
1885 } 1963 }
@@ -1897,12 +1975,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1897 1975
1898 ID = account.PrincipalID; 1976 ID = account.PrincipalID;
1899 1977
1900 m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID); 1978 m_log.DebugFormat("[RADMIN]: User {0}[{1}] created or retrieved", name, ID);
1901 include = true; 1979 include = true;
1902 } 1980 }
1903 catch (Exception e) 1981 catch (Exception e)
1904 { 1982 {
1905 m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message); 1983 m_log.DebugFormat("[RADMIN]: Error creating user {0} : {1}", name, e.Message);
1906 include = false; 1984 include = false;
1907 } 1985 }
1908 1986
@@ -1942,7 +2020,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1942 clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID; 2020 clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID;
1943 clothingFolder.Version = 1; 2021 clothingFolder.Version = 1;
1944 inventoryService.AddFolder(clothingFolder); // store base record 2022 inventoryService.AddFolder(clothingFolder); // store base record
1945 m_log.ErrorFormat("[RADMIN] Created clothing folder for {0}/{1}", name, ID); 2023 m_log.ErrorFormat("[RADMIN]: Created clothing folder for {0}/{1}", name, ID);
1946 } 2024 }
1947 2025
1948 // OK, now we have an inventory for the user, read in the outfits from the 2026 // OK, now we have an inventory for the user, read in the outfits from the
@@ -1955,7 +2033,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1955 2033
1956 foreach (XmlElement outfit in outfits) 2034 foreach (XmlElement outfit in outfits)
1957 { 2035 {
1958 m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}", 2036 m_log.DebugFormat("[RADMIN]: Loading outfit {0} for {1}",
1959 GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?")); 2037 GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?"));
1960 2038
1961 outfitName = GetStringAttribute(outfit,"name",""); 2039 outfitName = GetStringAttribute(outfit,"name","");
@@ -1979,7 +2057,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1979 // Otherwise, we must create the folder. 2057 // Otherwise, we must create the folder.
1980 if (extraFolder == null) 2058 if (extraFolder == null)
1981 { 2059 {
1982 m_log.DebugFormat("[RADMIN] Creating outfit folder {0} for {1}", outfitName, name); 2060 m_log.DebugFormat("[RADMIN]: Creating outfit folder {0} for {1}", outfitName, name);
1983 extraFolder = new InventoryFolderBase(); 2061 extraFolder = new InventoryFolderBase();
1984 extraFolder.ID = UUID.Random(); 2062 extraFolder.ID = UUID.Random();
1985 extraFolder.Name = outfitName; 2063 extraFolder.Name = outfitName;
@@ -1988,7 +2066,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1988 extraFolder.Version = 1; 2066 extraFolder.Version = 1;
1989 extraFolder.ParentID = clothingFolder.ID; 2067 extraFolder.ParentID = clothingFolder.ID;
1990 inventoryService.AddFolder(extraFolder); 2068 inventoryService.AddFolder(extraFolder);
1991 m_log.DebugFormat("[RADMIN] Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID); 2069 m_log.DebugFormat("[RADMIN]: Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID);
1992 } 2070 }
1993 2071
1994 // Now get the pieces that make up the outfit 2072 // Now get the pieces that make up the outfit
@@ -2003,7 +2081,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2003 switch (child.Name) 2081 switch (child.Name)
2004 { 2082 {
2005 case "Permissions" : 2083 case "Permissions" :
2006 m_log.DebugFormat("[RADMIN] Permissions specified"); 2084 m_log.DebugFormat("[RADMIN]: Permissions specified");
2007 perms = child; 2085 perms = child;
2008 break; 2086 break;
2009 case "Asset" : 2087 case "Asset" :
@@ -2053,7 +2131,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2053 inventoryItem.Folder = extraFolder.ID; // Parent folder 2131 inventoryItem.Folder = extraFolder.ID; // Parent folder
2054 2132
2055 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(inventoryItem); 2133 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(inventoryItem);
2056 m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID); 2134 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID);
2057 } 2135 }
2058 2136
2059 // Attach item, if attachpoint is specified 2137 // Attach item, if attachpoint is specified
@@ -2061,7 +2139,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2061 if (attachpoint != 0) 2139 if (attachpoint != 0)
2062 { 2140 {
2063 avatarAppearance.SetAttachment(attachpoint, inventoryItem.ID, inventoryItem.AssetID); 2141 avatarAppearance.SetAttachment(attachpoint, inventoryItem.ID, inventoryItem.AssetID);
2064 m_log.DebugFormat("[RADMIN] Attached {0}", inventoryItem.ID); 2142 m_log.DebugFormat("[RADMIN]: Attached {0}", inventoryItem.ID);
2065 } 2143 }
2066 2144
2067 // Record whether or not the item is to be initially worn 2145 // Record whether or not the item is to be initially worn
@@ -2074,32 +2152,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2074 } 2152 }
2075 catch (Exception e) 2153 catch (Exception e)
2076 { 2154 {
2077 m_log.WarnFormat("[RADMIN] Error wearing item {0} : {1}", inventoryItem.ID, e.Message); 2155 m_log.WarnFormat("[RADMIN]: Error wearing item {0} : {1}", inventoryItem.ID, e.Message);
2078 } 2156 }
2079 } // foreach item in outfit 2157 } // foreach item in outfit
2080 m_log.DebugFormat("[RADMIN] Outfit {0} load completed", outfitName); 2158 m_log.DebugFormat("[RADMIN]: Outfit {0} load completed", outfitName);
2081 } // foreach outfit 2159 } // foreach outfit
2082 m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name); 2160 m_log.DebugFormat("[RADMIN]: Inventory update complete for {0}", name);
2083 scene.AvatarService.SetAppearance(ID, avatarAppearance); 2161 scene.AvatarService.SetAppearance(ID, avatarAppearance);
2084 } 2162 }
2085 catch (Exception e) 2163 catch (Exception e)
2086 { 2164 {
2087 m_log.WarnFormat("[RADMIN] Inventory processing incomplete for user {0} : {1}", 2165 m_log.WarnFormat("[RADMIN]: Inventory processing incomplete for user {0} : {1}",
2088 name, e.Message); 2166 name, e.Message);
2089 } 2167 }
2090 } // End of include 2168 } // End of include
2091 } 2169 }
2092 m_log.DebugFormat("[RADMIN] Default avatar loading complete"); 2170 m_log.DebugFormat("[RADMIN]: Default avatar loading complete");
2093 } 2171 }
2094 else 2172 else
2095 { 2173 {
2096 m_log.DebugFormat("[RADMIN] No default avatar information available"); 2174 m_log.DebugFormat("[RADMIN]: No default avatar information available");
2097 return false; 2175 return false;
2098 } 2176 }
2099 } 2177 }
2100 catch (Exception e) 2178 catch (Exception e)
2101 { 2179 {
2102 m_log.WarnFormat("[RADMIN] Exception whilst loading default avatars ; {0}", e.Message); 2180 m_log.WarnFormat("[RADMIN]: Exception whilst loading default avatars ; {0}", e.Message);
2103 return false; 2181 return false;
2104 } 2182 }
2105 2183
@@ -2194,8 +2272,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2194 } 2272 }
2195 catch (Exception e) 2273 catch (Exception e)
2196 { 2274 {
2197 m_log.InfoFormat("[RADMIN] LoadOAR: {0}", e.Message); 2275 m_log.ErrorFormat("[RADMIN]: LoadOAR: {0} {1}", e.Message, e.StackTrace);
2198 m_log.DebugFormat("[RADMIN] LoadOAR: {0}", e.ToString());
2199 2276
2200 responseData["loaded"] = false; 2277 responseData["loaded"] = false;
2201 responseData["error"] = e.Message; 2278 responseData["error"] = e.Message;
@@ -2300,8 +2377,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2300 } 2377 }
2301 catch (Exception e) 2378 catch (Exception e)
2302 { 2379 {
2303 m_log.InfoFormat("[RADMIN] SaveOAR: {0}", e.Message); 2380 m_log.ErrorFormat("[RADMIN]: SaveOAR: {0} {1}", e.Message, e.StackTrace);
2304 m_log.DebugFormat("[RADMIN] SaveOAR: {0}", e.ToString());
2305 2381
2306 responseData["saved"] = false; 2382 responseData["saved"] = false;
2307 responseData["error"] = e.Message; 2383 responseData["error"] = e.Message;
@@ -2315,7 +2391,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2315 2391
2316 private void RemoteAdminOarSaveCompleted(Guid uuid, string name) 2392 private void RemoteAdminOarSaveCompleted(Guid uuid, string name)
2317 { 2393 {
2318 m_log.DebugFormat("[RADMIN] File processing complete for {0}", name); 2394 m_log.DebugFormat("[RADMIN]: File processing complete for {0}", name);
2319 lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock); 2395 lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock);
2320 } 2396 }
2321 2397
@@ -2353,14 +2429,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2353 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2429 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2354 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2430 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2355 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2431 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2356 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2432 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2357 } 2433 }
2358 else if (requestData.Contains("region_name")) 2434 else if (requestData.Contains("region_name"))
2359 { 2435 {
2360 string region_name = (string) requestData["region_name"]; 2436 string region_name = (string) requestData["region_name"];
2361 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2437 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2362 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2438 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2363 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2439 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2364 } 2440 }
2365 else throw new Exception("neither region_name nor region_uuid given"); 2441 else throw new Exception("neither region_name nor region_uuid given");
2366 2442
@@ -2391,8 +2467,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2391 } 2467 }
2392 catch (Exception e) 2468 catch (Exception e)
2393 { 2469 {
2394 m_log.InfoFormat("[RADMIN] LoadXml: {0}", e.Message); 2470 m_log.ErrorFormat("[RADMIN] LoadXml: {0} {1}", e.Message, e.StackTrace);
2395 m_log.DebugFormat("[RADMIN] LoadXml: {0}", e.ToString());
2396 2471
2397 responseData["loaded"] = false; 2472 responseData["loaded"] = false;
2398 responseData["switched"] = false; 2473 responseData["switched"] = false;
@@ -2438,14 +2513,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2438 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2513 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2439 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2514 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2440 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2515 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2441 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2516 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2442 } 2517 }
2443 else if (requestData.Contains("region_name")) 2518 else if (requestData.Contains("region_name"))
2444 { 2519 {
2445 string region_name = (string) requestData["region_name"]; 2520 string region_name = (string) requestData["region_name"];
2446 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2521 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2447 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2522 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2448 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2523 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2449 } 2524 }
2450 else throw new Exception("neither region_name nor region_uuid given"); 2525 else throw new Exception("neither region_name nor region_uuid given");
2451 2526
@@ -2477,8 +2552,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2477 } 2552 }
2478 catch (Exception e) 2553 catch (Exception e)
2479 { 2554 {
2480 m_log.InfoFormat("[RADMIN] SaveXml: {0}", e.Message); 2555 m_log.ErrorFormat("[RADMIN]: SaveXml: {0} {1}", e.Message, e.StackTrace);
2481 m_log.DebugFormat("[RADMIN] SaveXml: {0}", e.ToString());
2482 2556
2483 responseData["saved"] = false; 2557 responseData["saved"] = false;
2484 responseData["switched"] = false; 2558 responseData["switched"] = false;
@@ -2517,14 +2591,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2517 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2591 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2518 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2592 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2519 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2593 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2520 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2594 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2521 } 2595 }
2522 else if (requestData.Contains("region_name")) 2596 else if (requestData.Contains("region_name"))
2523 { 2597 {
2524 string region_name = (string) requestData["region_name"]; 2598 string region_name = (string) requestData["region_name"];
2525 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2599 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2526 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2600 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2527 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2601 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2528 } 2602 }
2529 else throw new Exception("neither region_name nor region_uuid given"); 2603 else throw new Exception("neither region_name nor region_uuid given");
2530 2604
@@ -2536,7 +2610,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2536 } 2610 }
2537 catch (Exception e) 2611 catch (Exception e)
2538 { 2612 {
2539 m_log.InfoFormat("[RADMIN] RegionQuery: {0}", e.Message); 2613 m_log.InfoFormat("[RADMIN]: RegionQuery: {0}", e.Message);
2540 2614
2541 responseData["success"] = false; 2615 responseData["success"] = false;
2542 responseData["error"] = e.Message; 2616 responseData["error"] = e.Message;
@@ -2577,7 +2651,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2577 } 2651 }
2578 catch (Exception e) 2652 catch (Exception e)
2579 { 2653 {
2580 m_log.InfoFormat("[RADMIN] ConsoleCommand: {0}", e.Message); 2654 m_log.InfoFormat("[RADMIN]: ConsoleCommand: {0}", e.Message);
2581 2655
2582 responseData["success"] = false; 2656 responseData["success"] = false;
2583 responseData["error"] = e.Message; 2657 responseData["error"] = e.Message;
@@ -2614,14 +2688,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2614 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2688 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2615 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2689 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2616 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2690 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2617 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2691 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2618 } 2692 }
2619 else if (requestData.Contains("region_name")) 2693 else if (requestData.Contains("region_name"))
2620 { 2694 {
2621 string region_name = (string) requestData["region_name"]; 2695 string region_name = (string) requestData["region_name"];
2622 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2696 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2623 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2697 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2624 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2698 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2625 } 2699 }
2626 else throw new Exception("neither region_name nor region_uuid given"); 2700 else throw new Exception("neither region_name nor region_uuid given");
2627 2701
@@ -2632,7 +2706,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2632 } 2706 }
2633 catch (Exception e) 2707 catch (Exception e)
2634 { 2708 {
2635 m_log.InfoFormat("[RADMIN] Access List Clear Request: {0}", e.Message); 2709 m_log.ErrorFormat("[RADMIN]: Access List Clear Request: {0} {1}", e.Message, e.StackTrace);
2636 2710
2637 responseData["success"] = false; 2711 responseData["success"] = false;
2638 responseData["error"] = e.Message; 2712 responseData["error"] = e.Message;
@@ -2671,14 +2745,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2671 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2745 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2672 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2746 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2673 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2747 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2674 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2748 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2675 } 2749 }
2676 else if (requestData.Contains("region_name")) 2750 else if (requestData.Contains("region_name"))
2677 { 2751 {
2678 string region_name = (string) requestData["region_name"]; 2752 string region_name = (string) requestData["region_name"];
2679 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2753 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2680 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2754 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2681 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2755 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2682 } 2756 }
2683 else throw new Exception("neither region_name nor region_uuid given"); 2757 else throw new Exception("neither region_name nor region_uuid given");
2684 2758
@@ -2698,7 +2772,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2698 if (account != null) 2772 if (account != null)
2699 { 2773 {
2700 uuids.Add(account.PrincipalID); 2774 uuids.Add(account.PrincipalID);
2701 m_log.DebugFormat("[RADMIN] adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName); 2775 m_log.DebugFormat("[RADMIN]: adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName);
2702 } 2776 }
2703 } 2777 }
2704 List<UUID> accessControlList = new List<UUID>(scene.RegionInfo.EstateSettings.EstateAccess); 2778 List<UUID> accessControlList = new List<UUID>(scene.RegionInfo.EstateSettings.EstateAccess);
@@ -2719,7 +2793,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2719 } 2793 }
2720 catch (Exception e) 2794 catch (Exception e)
2721 { 2795 {
2722 m_log.InfoFormat("[RADMIN] Access List Add Request: {0}", e.Message); 2796 m_log.ErrorFormat("[RADMIN]: Access List Add Request: {0} {1}", e.Message, e.StackTrace);
2723 2797
2724 responseData["success"] = false; 2798 responseData["success"] = false;
2725 responseData["error"] = e.Message; 2799 responseData["error"] = e.Message;
@@ -2758,14 +2832,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2758 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2832 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2759 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2833 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2760 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2834 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2761 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2835 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2762 } 2836 }
2763 else if (requestData.Contains("region_name")) 2837 else if (requestData.Contains("region_name"))
2764 { 2838 {
2765 string region_name = (string) requestData["region_name"]; 2839 string region_name = (string) requestData["region_name"];
2766 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2840 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2767 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2841 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2768 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2842 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2769 } 2843 }
2770 else throw new Exception("neither region_name nor region_uuid given"); 2844 else throw new Exception("neither region_name nor region_uuid given");
2771 2845
@@ -2806,7 +2880,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2806 } 2880 }
2807 catch (Exception e) 2881 catch (Exception e)
2808 { 2882 {
2809 m_log.InfoFormat("[RADMIN] Access List Remove Request: {0}", e.Message); 2883 m_log.ErrorFormat("[RADMIN]: Access List Remove Request: {0} {1}", e.Message, e.StackTrace);
2810 2884
2811 responseData["success"] = false; 2885 responseData["success"] = false;
2812 responseData["error"] = e.Message; 2886 responseData["error"] = e.Message;
@@ -2845,14 +2919,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2845 UUID region_uuid = (UUID) (string) requestData["region_uuid"]; 2919 UUID region_uuid = (UUID) (string) requestData["region_uuid"];
2846 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) 2920 if (!m_application.SceneManager.TrySetCurrentScene(region_uuid))
2847 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); 2921 throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString()));
2848 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); 2922 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString());
2849 } 2923 }
2850 else if (requestData.Contains("region_name")) 2924 else if (requestData.Contains("region_name"))
2851 { 2925 {
2852 string region_name = (string) requestData["region_name"]; 2926 string region_name = (string) requestData["region_name"];
2853 if (!m_application.SceneManager.TrySetCurrentScene(region_name)) 2927 if (!m_application.SceneManager.TrySetCurrentScene(region_name))
2854 throw new Exception(String.Format("failed to switch to region {0}", region_name)); 2928 throw new Exception(String.Format("failed to switch to region {0}", region_name));
2855 m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); 2929 m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name);
2856 } 2930 }
2857 else throw new Exception("neither region_name nor region_uuid given"); 2931 else throw new Exception("neither region_name nor region_uuid given");
2858 2932
@@ -2874,7 +2948,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2874 } 2948 }
2875 catch (Exception e) 2949 catch (Exception e)
2876 { 2950 {
2877 m_log.InfoFormat("[RADMIN] Acces List List: {0}", e.Message); 2951 m_log.ErrorFormat("[RADMIN]: Access List List: {0} {1}", e.Message, e.StackTrace);
2878 2952
2879 responseData["success"] = false; 2953 responseData["success"] = false;
2880 responseData["error"] = e.Message; 2954 responseData["error"] = e.Message;