diff options
author | Melanie | 2011-04-17 18:48:53 +0100 |
---|---|---|
committer | Melanie | 2011-04-17 18:48:53 +0100 |
commit | 474910c9d624b53c010232ddb32b4002f58f1de0 (patch) | |
tree | 45ddab37c6afa0b095ffa0503640b9fe235bc400 /OpenSim/ApplicationPlugins | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | More descriptive debug msg for ServiceOSDRequest failures. (diff) | |
download | opensim-SC-474910c9d624b53c010232ddb32b4002f58f1de0.zip opensim-SC-474910c9d624b53c010232ddb32b4002f58f1de0.tar.gz opensim-SC-474910c9d624b53c010232ddb32b4002f58f1de0.tar.bz2 opensim-SC-474910c9d624b53c010232ddb32b4002f58f1de0.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 196 |
1 files changed, 107 insertions, 89 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 9659883..10cd3d5 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 | ||
@@ -266,8 +266,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
266 | } | 266 | } |
267 | catch (Exception e) | 267 | catch (Exception e) |
268 | { | 268 | { |
269 | m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0}", e.Message); | 269 | m_log.ErrorFormat("[RADMIN]: Restart region: failed: {0} {1}", e.Message, e.StackTrace); |
270 | m_log.DebugFormat("[RADMIN]: Restart region: failed: {0}", e.ToString()); | ||
271 | responseData["accepted"] = false; | 270 | responseData["accepted"] = false; |
272 | responseData["success"] = false; | 271 | responseData["success"] = false; |
273 | responseData["rebooting"] = false; | 272 | responseData["rebooting"] = false; |
@@ -313,8 +312,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
313 | } | 312 | } |
314 | catch (Exception e) | 313 | catch (Exception e) |
315 | { | 314 | { |
316 | m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message); | 315 | m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message, e.StackTrace); |
317 | m_log.DebugFormat("[RADMIN]: Broadcasting: failed: {0}", e.ToString()); | ||
318 | 316 | ||
319 | responseData["accepted"] = false; | 317 | responseData["accepted"] = false; |
320 | responseData["success"] = false; | 318 | responseData["success"] = false; |
@@ -384,7 +382,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
384 | { | 382 | { |
385 | Hashtable requestData = (Hashtable) request.Params[0]; | 383 | Hashtable requestData = (Hashtable) request.Params[0]; |
386 | 384 | ||
387 | m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request.ToString()); | 385 | m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}", request); |
388 | // foreach (string k in requestData.Keys) | 386 | // foreach (string k in requestData.Keys) |
389 | // { | 387 | // { |
390 | // m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}", | 388 | // m_log.DebugFormat("[RADMIN]: Load Terrain: XmlRpc {0}: >{1}< {2}", |
@@ -431,8 +429,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
431 | } | 429 | } |
432 | catch (Exception e) | 430 | catch (Exception e) |
433 | { | 431 | { |
434 | m_log.ErrorFormat("[RADMIN]: Terrain Loading: failed: {0}", e.Message); | 432 | m_log.ErrorFormat("[RADMIN]: Terrain Loading: failed: {0} {1}", e.Message, e.StackTrace); |
435 | m_log.DebugFormat("[RADMIN]: Terrain Loading: failed: {0}", e.ToString()); | ||
436 | 433 | ||
437 | responseData["success"] = false; | 434 | responseData["success"] = false; |
438 | responseData["error"] = e.Message; | 435 | responseData["error"] = e.Message; |
@@ -520,14 +517,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
520 | } | 517 | } |
521 | catch (Exception e) | 518 | catch (Exception e) |
522 | { | 519 | { |
523 | m_log.ErrorFormat("[RADMIN] Shutdown: failed: {0}", e.Message); | 520 | m_log.ErrorFormat("[RADMIN]: Shutdown: failed: {0} {1}", e.Message, e.StackTrace); |
524 | m_log.DebugFormat("[RADMIN] Shutdown: failed: {0}", e.ToString()); | ||
525 | 521 | ||
526 | responseData["accepted"] = false; | 522 | responseData["accepted"] = false; |
527 | responseData["error"] = e.Message; | 523 | responseData["error"] = e.Message; |
528 | 524 | ||
529 | response.Value = responseData; | 525 | response.Value = responseData; |
530 | } | 526 | } |
527 | |||
531 | m_log.Info("[RADMIN]: Shutdown Administrator Request complete"); | 528 | m_log.Info("[RADMIN]: Shutdown Administrator Request complete"); |
532 | return response; | 529 | return response; |
533 | } | 530 | } |
@@ -828,8 +825,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
828 | } | 825 | } |
829 | catch (Exception e) | 826 | catch (Exception e) |
830 | { | 827 | { |
831 | m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0}", e.Message); | 828 | m_log.ErrorFormat("[RADMIN] CreateRegion: failed {0} {1}", e.Message, e.StackTrace); |
832 | m_log.DebugFormat("[RADMIN] CreateRegion: failed {0}", e.ToString()); | ||
833 | 829 | ||
834 | responseData["success"] = false; | 830 | responseData["success"] = false; |
835 | responseData["error"] = e.Message; | 831 | responseData["error"] = e.Message; |
@@ -895,8 +891,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
895 | } | 891 | } |
896 | catch (Exception e) | 892 | catch (Exception e) |
897 | { | 893 | { |
898 | m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0}", e.Message); | 894 | m_log.ErrorFormat("[RADMIN] DeleteRegion: failed {0} {1}", e.Message, e.StackTrace); |
899 | m_log.DebugFormat("[RADMIN] DeleteRegion: failed {0}", e.ToString()); | ||
900 | 895 | ||
901 | responseData["success"] = false; | 896 | responseData["success"] = false; |
902 | responseData["error"] = e.Message; | 897 | responseData["error"] = e.Message; |
@@ -987,8 +982,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
987 | } | 982 | } |
988 | catch (Exception e) | 983 | catch (Exception e) |
989 | { | 984 | { |
990 | m_log.ErrorFormat("[RADMIN] CloseRegion: failed {0}", e.Message); | 985 | m_log.ErrorFormat("[RADMIN]: CloseRegion: failed {0} {1}", e.Message, e.StackTrace); |
991 | m_log.DebugFormat("[RADMIN] CloseRegion: failed {0}", e.ToString()); | ||
992 | 986 | ||
993 | responseData["success"] = false; | 987 | responseData["success"] = false; |
994 | responseData["error"] = e.Message; | 988 | responseData["error"] = e.Message; |
@@ -1085,8 +1079,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1085 | } | 1079 | } |
1086 | catch (Exception e) | 1080 | catch (Exception e) |
1087 | { | 1081 | { |
1088 | m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0}", e.Message); | 1082 | m_log.ErrorFormat("[RADMIN] ModifyRegion: failed {0} {1}", e.Message, e.StackTrace); |
1089 | m_log.DebugFormat("[RADMIN] ModifyRegion: failed {0}", e.ToString()); | ||
1090 | 1083 | ||
1091 | responseData["success"] = false; | 1084 | responseData["success"] = false; |
1092 | responseData["error"] = e.Message; | 1085 | responseData["error"] = e.Message; |
@@ -1209,8 +1202,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1209 | } | 1202 | } |
1210 | catch (Exception e) | 1203 | catch (Exception e) |
1211 | { | 1204 | { |
1212 | m_log.ErrorFormat("[RADMIN] CreateUser: failed: {0}", e.Message); | 1205 | m_log.ErrorFormat("[RADMIN]: CreateUser: failed: {0} {1}", e.Message, e.StackTrace); |
1213 | m_log.DebugFormat("[RADMIN] CreateUser: failed: {0}", e.ToString()); | ||
1214 | 1206 | ||
1215 | responseData["success"] = false; | 1207 | responseData["success"] = false; |
1216 | responseData["avatar_uuid"] = UUID.Zero.ToString(); | 1208 | responseData["avatar_uuid"] = UUID.Zero.ToString(); |
@@ -1301,8 +1293,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1301 | } | 1293 | } |
1302 | catch (Exception e) | 1294 | catch (Exception e) |
1303 | { | 1295 | { |
1304 | m_log.ErrorFormat("[RADMIN] UserExists: failed: {0}", e.Message); | 1296 | m_log.ErrorFormat("[RADMIN]: UserExists: failed: {0} {1}", e.Message, e.StackTrace); |
1305 | m_log.DebugFormat("[RADMIN] UserExists: failed: {0}", e.ToString()); | ||
1306 | 1297 | ||
1307 | responseData["success"] = false; | 1298 | responseData["success"] = false; |
1308 | responseData["error"] = e.Message; | 1299 | responseData["error"] = e.Message; |
@@ -1475,9 +1466,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1475 | } | 1466 | } |
1476 | catch (Exception e) | 1467 | catch (Exception e) |
1477 | { | 1468 | { |
1478 | 1469 | m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0} {1}", e.Message, e.StackTrace); | |
1479 | m_log.ErrorFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.Message); | ||
1480 | m_log.DebugFormat("[RADMIN] UpdateUserAccount: failed: {0}", e.ToString()); | ||
1481 | 1470 | ||
1482 | responseData["success"] = false; | 1471 | responseData["success"] = false; |
1483 | responseData["avatar_uuid"] = UUID.Zero.ToString(); | 1472 | responseData["avatar_uuid"] = UUID.Zero.ToString(); |
@@ -1485,6 +1474,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1485 | 1474 | ||
1486 | response.Value = responseData; | 1475 | response.Value = responseData; |
1487 | } | 1476 | } |
1477 | |||
1488 | m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); | 1478 | m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); |
1489 | return response; | 1479 | return response; |
1490 | } | 1480 | } |
@@ -1500,7 +1490,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1500 | 1490 | ||
1501 | private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) | 1491 | private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) |
1502 | { | 1492 | { |
1503 | m_log.DebugFormat("[RADMIN] updateUserAppearance"); | 1493 | m_log.DebugFormat("[RADMIN]: updateUserAppearance"); |
1504 | 1494 | ||
1505 | string defaultMale = m_config.GetString("default_male", "Default Male"); | 1495 | string defaultMale = m_config.GetString("default_male", "Default Male"); |
1506 | string defaultFemale = m_config.GetString("default_female", "Default Female"); | 1496 | string defaultFemale = m_config.GetString("default_female", "Default Female"); |
@@ -1540,16 +1530,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1540 | 1530 | ||
1541 | if (String.IsNullOrEmpty(model)) | 1531 | if (String.IsNullOrEmpty(model)) |
1542 | { | 1532 | { |
1543 | m_log.DebugFormat("[RADMIN] Appearance update not requested"); | 1533 | m_log.DebugFormat("[RADMIN]: Appearance update not requested"); |
1544 | return; | 1534 | return; |
1545 | } | 1535 | } |
1546 | 1536 | ||
1547 | m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model <{1}>", userid, model); | 1537 | m_log.DebugFormat("[RADMIN]: Setting appearance for avatar {0}, using model <{1}>", userid, model); |
1548 | 1538 | ||
1549 | string[] modelSpecifiers = model.Split(); | 1539 | string[] modelSpecifiers = model.Split(); |
1550 | if (modelSpecifiers.Length != 2) | 1540 | if (modelSpecifiers.Length != 2) |
1551 | { | 1541 | { |
1552 | m_log.WarnFormat("[RADMIN] User appearance not set for {0}. Invalid model name : <{1}>", userid, model); | 1542 | m_log.WarnFormat("[RADMIN]: User appearance not set for {0}. Invalid model name : <{1}>", userid, model); |
1553 | // modelSpecifiers = dmodel.Split(); | 1543 | // modelSpecifiers = dmodel.Split(); |
1554 | return; | 1544 | return; |
1555 | } | 1545 | } |
@@ -1560,7 +1550,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1560 | 1550 | ||
1561 | if (modelProfile == null) | 1551 | if (modelProfile == null) |
1562 | { | 1552 | { |
1563 | m_log.WarnFormat("[RADMIN] Requested model ({0}) not found. Appearance unchanged", model); | 1553 | m_log.WarnFormat("[RADMIN]: Requested model ({0}) not found. Appearance unchanged", model); |
1564 | return; | 1554 | return; |
1565 | } | 1555 | } |
1566 | 1556 | ||
@@ -1570,7 +1560,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1570 | 1560 | ||
1571 | EstablishAppearance(userid, modelProfile.PrincipalID); | 1561 | EstablishAppearance(userid, modelProfile.PrincipalID); |
1572 | 1562 | ||
1573 | m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", | 1563 | m_log.DebugFormat("[RADMIN]: Finished setting appearance for avatar {0}, using model {1}", |
1574 | userid, model); | 1564 | userid, model); |
1575 | } | 1565 | } |
1576 | 1566 | ||
@@ -1582,7 +1572,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1582 | 1572 | ||
1583 | private void EstablishAppearance(UUID destination, UUID source) | 1573 | private void EstablishAppearance(UUID destination, UUID source) |
1584 | { | 1574 | { |
1585 | m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", destination, source); | 1575 | m_log.DebugFormat("[RADMIN]: Initializing inventory for {0} from {1}", destination, source); |
1586 | Scene scene = m_application.SceneManager.CurrentOrFirstScene; | 1576 | Scene scene = m_application.SceneManager.CurrentOrFirstScene; |
1587 | 1577 | ||
1588 | // If the model has no associated appearance we're done. | 1578 | // If the model has no associated appearance we're done. |
@@ -1604,7 +1594,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1604 | } | 1594 | } |
1605 | catch (Exception e) | 1595 | catch (Exception e) |
1606 | { | 1596 | { |
1607 | m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}", | 1597 | m_log.WarnFormat("[RADMIN]: Error transferring appearance for {0} : {1}", |
1608 | destination, e.Message); | 1598 | destination, e.Message); |
1609 | } | 1599 | } |
1610 | 1600 | ||
@@ -1635,7 +1625,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1635 | } | 1625 | } |
1636 | catch (Exception e) | 1626 | catch (Exception e) |
1637 | { | 1627 | { |
1638 | m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}", | 1628 | m_log.WarnFormat("[RADMIN]: Error transferring appearance for {0} : {1}", |
1639 | destination, e.Message); | 1629 | destination, e.Message); |
1640 | } | 1630 | } |
1641 | 1631 | ||
@@ -1670,7 +1660,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1670 | destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; | 1660 | destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; |
1671 | destinationFolder.Version = 1; | 1661 | destinationFolder.Version = 1; |
1672 | inventoryService.AddFolder(destinationFolder); // store base record | 1662 | inventoryService.AddFolder(destinationFolder); // store base record |
1673 | m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source); | 1663 | m_log.ErrorFormat("[RADMIN]: Created folder for destination {0}", source); |
1674 | } | 1664 | } |
1675 | 1665 | ||
1676 | // Wearables | 1666 | // Wearables |
@@ -1690,6 +1680,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1690 | { | 1680 | { |
1691 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); | 1681 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); |
1692 | destinationItem.Name = item.Name; | 1682 | destinationItem.Name = item.Name; |
1683 | destinationItem.Owner = destination; | ||
1693 | destinationItem.Description = item.Description; | 1684 | destinationItem.Description = item.Description; |
1694 | destinationItem.InvType = item.InvType; | 1685 | destinationItem.InvType = item.InvType; |
1695 | destinationItem.CreatorId = item.CreatorId; | 1686 | destinationItem.CreatorId = item.CreatorId; |
@@ -1709,6 +1700,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1709 | destinationItem.Flags = item.Flags; | 1700 | destinationItem.Flags = item.Flags; |
1710 | destinationItem.CreationDate = item.CreationDate; | 1701 | destinationItem.CreationDate = item.CreationDate; |
1711 | destinationItem.Folder = destinationFolder.ID; | 1702 | destinationItem.Folder = destinationFolder.ID; |
1703 | ApplyNextOwnerPermissions(destinationItem); | ||
1712 | 1704 | ||
1713 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); | 1705 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); |
1714 | m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); | 1706 | m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); |
@@ -1743,6 +1735,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1743 | { | 1735 | { |
1744 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); | 1736 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); |
1745 | destinationItem.Name = item.Name; | 1737 | destinationItem.Name = item.Name; |
1738 | destinationItem.Owner = destination; | ||
1746 | destinationItem.Description = item.Description; | 1739 | destinationItem.Description = item.Description; |
1747 | destinationItem.InvType = item.InvType; | 1740 | destinationItem.InvType = item.InvType; |
1748 | destinationItem.CreatorId = item.CreatorId; | 1741 | destinationItem.CreatorId = item.CreatorId; |
@@ -1762,6 +1755,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1762 | destinationItem.Flags = item.Flags; | 1755 | destinationItem.Flags = item.Flags; |
1763 | destinationItem.CreationDate = item.CreationDate; | 1756 | destinationItem.CreationDate = item.CreationDate; |
1764 | destinationItem.Folder = destinationFolder.ID; | 1757 | destinationItem.Folder = destinationFolder.ID; |
1758 | ApplyNextOwnerPermissions(destinationItem); | ||
1765 | 1759 | ||
1766 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); | 1760 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); |
1767 | m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); | 1761 | m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); |
@@ -1819,13 +1813,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1819 | { | 1813 | { |
1820 | destinationFolder = new InventoryFolderBase(); | 1814 | destinationFolder = new InventoryFolderBase(); |
1821 | destinationFolder.ID = UUID.Random(); | 1815 | destinationFolder.ID = UUID.Random(); |
1822 | destinationFolder.Name = assetType.ToString(); | 1816 | if (assetType == AssetType.Clothing) { |
1817 | destinationFolder.Name = "Clothing"; | ||
1818 | } else { | ||
1819 | destinationFolder.Name = "Body Parts"; | ||
1820 | } | ||
1823 | destinationFolder.Owner = destination; | 1821 | destinationFolder.Owner = destination; |
1824 | destinationFolder.Type = (short)assetType; | 1822 | destinationFolder.Type = (short)assetType; |
1825 | destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; | 1823 | destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; |
1826 | destinationFolder.Version = 1; | 1824 | destinationFolder.Version = 1; |
1827 | inventoryService.AddFolder(destinationFolder); // store base record | 1825 | inventoryService.AddFolder(destinationFolder); // store base record |
1828 | m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source); | 1826 | m_log.ErrorFormat("[RADMIN]: Created folder for destination {0}", source); |
1829 | } | 1827 | } |
1830 | 1828 | ||
1831 | InventoryFolderBase extraFolder; | 1829 | InventoryFolderBase extraFolder; |
@@ -1843,7 +1841,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1843 | extraFolder.ParentID = destinationFolder.ID; | 1841 | extraFolder.ParentID = destinationFolder.ID; |
1844 | inventoryService.AddFolder(extraFolder); | 1842 | inventoryService.AddFolder(extraFolder); |
1845 | 1843 | ||
1846 | m_log.DebugFormat("[RADMIN] Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID); | 1844 | m_log.DebugFormat("[RADMIN]: Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID); |
1847 | 1845 | ||
1848 | List<InventoryItemBase> items = inventoryService.GetFolderContent(source, folder.ID).Items; | 1846 | List<InventoryItemBase> items = inventoryService.GetFolderContent(source, folder.ID).Items; |
1849 | 1847 | ||
@@ -1851,6 +1849,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1851 | { | 1849 | { |
1852 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); | 1850 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); |
1853 | destinationItem.Name = item.Name; | 1851 | destinationItem.Name = item.Name; |
1852 | destinationItem.Owner = destination; | ||
1854 | destinationItem.Description = item.Description; | 1853 | destinationItem.Description = item.Description; |
1855 | destinationItem.InvType = item.InvType; | 1854 | destinationItem.InvType = item.InvType; |
1856 | destinationItem.CreatorId = item.CreatorId; | 1855 | destinationItem.CreatorId = item.CreatorId; |
@@ -1870,6 +1869,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1870 | destinationItem.Flags = item.Flags; | 1869 | destinationItem.Flags = item.Flags; |
1871 | destinationItem.CreationDate = item.CreationDate; | 1870 | destinationItem.CreationDate = item.CreationDate; |
1872 | destinationItem.Folder = extraFolder.ID; | 1871 | destinationItem.Folder = extraFolder.ID; |
1872 | ApplyNextOwnerPermissions(destinationItem); | ||
1873 | 1873 | ||
1874 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); | 1874 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); |
1875 | inventoryMap.Add(item.ID, destinationItem.ID); | 1875 | inventoryMap.Add(item.ID, destinationItem.ID); |
@@ -1887,6 +1887,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1887 | } | 1887 | } |
1888 | 1888 | ||
1889 | /// <summary> | 1889 | /// <summary> |
1890 | /// Apply next owner permissions. | ||
1891 | /// </summary> | ||
1892 | |||
1893 | private void ApplyNextOwnerPermissions(InventoryItemBase item) | ||
1894 | { | ||
1895 | if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0) | ||
1896 | { | ||
1897 | if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0) | ||
1898 | item.CurrentPermissions &= ~(uint)PermissionMask.Copy; | ||
1899 | if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0) | ||
1900 | item.CurrentPermissions &= ~(uint)PermissionMask.Transfer; | ||
1901 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) | ||
1902 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; | ||
1903 | } | ||
1904 | item.CurrentPermissions &= item.NextPermissions; | ||
1905 | item.BasePermissions &= item.NextPermissions; | ||
1906 | item.EveryOnePermissions &= item.NextPermissions; | ||
1907 | // item.OwnerChanged = true; | ||
1908 | // item.PermsMask = 0; | ||
1909 | // item.PermsGranter = UUID.Zero; | ||
1910 | } | ||
1911 | |||
1912 | /// <summary> | ||
1890 | /// This method is called if a given model avatar name can not be found. If the external | 1913 | /// This method is called if a given model avatar name can not be found. If the external |
1891 | /// file has already been loaded once, then control returns immediately. If not, then it | 1914 | /// file has already been loaded once, then control returns immediately. If not, then it |
1892 | /// looks for a default appearance file. This file contains XML definitions of zero or more named | 1915 | /// looks for a default appearance file. This file contains XML definitions of zero or more named |
@@ -1895,7 +1918,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1895 | /// indicate which outfit is the default, and this outfit will be automatically worn. The | 1918 | /// indicate which outfit is the default, and this outfit will be automatically worn. The |
1896 | /// other outfits are provided to allow "real" avatars a way to easily change their outfits. | 1919 | /// other outfits are provided to allow "real" avatars a way to easily change their outfits. |
1897 | /// </summary> | 1920 | /// </summary> |
1898 | |||
1899 | private bool CreateDefaultAvatars() | 1921 | private bool CreateDefaultAvatars() |
1900 | { | 1922 | { |
1901 | // Only load once | 1923 | // Only load once |
@@ -1904,7 +1926,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1904 | return false; | 1926 | return false; |
1905 | } | 1927 | } |
1906 | 1928 | ||
1907 | m_log.DebugFormat("[RADMIN] Creating default avatar entries"); | 1929 | m_log.DebugFormat("[RADMIN]: Creating default avatar entries"); |
1908 | 1930 | ||
1909 | m_defaultAvatarsLoaded = true; | 1931 | m_defaultAvatarsLoaded = true; |
1910 | 1932 | ||
@@ -1960,7 +1982,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1960 | 1982 | ||
1961 | foreach (XmlElement avatar in avatars) | 1983 | foreach (XmlElement avatar in avatars) |
1962 | { | 1984 | { |
1963 | m_log.DebugFormat("[RADMIN] Loading appearance for {0}, gender = {1}", | 1985 | m_log.DebugFormat("[RADMIN]: Loading appearance for {0}, gender = {1}", |
1964 | GetStringAttribute(avatar,"name","?"), GetStringAttribute(avatar,"gender","?")); | 1986 | GetStringAttribute(avatar,"name","?"), GetStringAttribute(avatar,"gender","?")); |
1965 | 1987 | ||
1966 | // Create the user identified by the avatar entry | 1988 | // Create the user identified by the avatar entry |
@@ -1982,7 +2004,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1982 | account = CreateUser(scopeID, names[0], names[1], password, email); | 2004 | account = CreateUser(scopeID, names[0], names[1], password, email); |
1983 | if (null == account) | 2005 | if (null == account) |
1984 | { | 2006 | { |
1985 | m_log.ErrorFormat("[RADMIN] Avatar {0} {1} was not created", names[0], names[1]); | 2007 | m_log.ErrorFormat("[RADMIN]: Avatar {0} {1} was not created", names[0], names[1]); |
1986 | return false; | 2008 | return false; |
1987 | } | 2009 | } |
1988 | } | 2010 | } |
@@ -2000,12 +2022,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2000 | 2022 | ||
2001 | ID = account.PrincipalID; | 2023 | ID = account.PrincipalID; |
2002 | 2024 | ||
2003 | m_log.DebugFormat("[RADMIN] User {0}[{1}] created or retrieved", name, ID); | 2025 | m_log.DebugFormat("[RADMIN]: User {0}[{1}] created or retrieved", name, ID); |
2004 | include = true; | 2026 | include = true; |
2005 | } | 2027 | } |
2006 | catch (Exception e) | 2028 | catch (Exception e) |
2007 | { | 2029 | { |
2008 | m_log.DebugFormat("[RADMIN] Error creating user {0} : {1}", name, e.Message); | 2030 | m_log.DebugFormat("[RADMIN]: Error creating user {0} : {1}", name, e.Message); |
2009 | include = false; | 2031 | include = false; |
2010 | } | 2032 | } |
2011 | 2033 | ||
@@ -2045,7 +2067,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2045 | clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID; | 2067 | clothingFolder.ParentID = inventoryService.GetRootFolder(ID).ID; |
2046 | clothingFolder.Version = 1; | 2068 | clothingFolder.Version = 1; |
2047 | inventoryService.AddFolder(clothingFolder); // store base record | 2069 | inventoryService.AddFolder(clothingFolder); // store base record |
2048 | m_log.ErrorFormat("[RADMIN] Created clothing folder for {0}/{1}", name, ID); | 2070 | m_log.ErrorFormat("[RADMIN]: Created clothing folder for {0}/{1}", name, ID); |
2049 | } | 2071 | } |
2050 | 2072 | ||
2051 | // OK, now we have an inventory for the user, read in the outfits from the | 2073 | // OK, now we have an inventory for the user, read in the outfits from the |
@@ -2058,7 +2080,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2058 | 2080 | ||
2059 | foreach (XmlElement outfit in outfits) | 2081 | foreach (XmlElement outfit in outfits) |
2060 | { | 2082 | { |
2061 | m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}", | 2083 | m_log.DebugFormat("[RADMIN]: Loading outfit {0} for {1}", |
2062 | GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?")); | 2084 | GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?")); |
2063 | 2085 | ||
2064 | outfitName = GetStringAttribute(outfit,"name",""); | 2086 | outfitName = GetStringAttribute(outfit,"name",""); |
@@ -2082,7 +2104,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2082 | // Otherwise, we must create the folder. | 2104 | // Otherwise, we must create the folder. |
2083 | if (extraFolder == null) | 2105 | if (extraFolder == null) |
2084 | { | 2106 | { |
2085 | m_log.DebugFormat("[RADMIN] Creating outfit folder {0} for {1}", outfitName, name); | 2107 | m_log.DebugFormat("[RADMIN]: Creating outfit folder {0} for {1}", outfitName, name); |
2086 | extraFolder = new InventoryFolderBase(); | 2108 | extraFolder = new InventoryFolderBase(); |
2087 | extraFolder.ID = UUID.Random(); | 2109 | extraFolder.ID = UUID.Random(); |
2088 | extraFolder.Name = outfitName; | 2110 | extraFolder.Name = outfitName; |
@@ -2091,7 +2113,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2091 | extraFolder.Version = 1; | 2113 | extraFolder.Version = 1; |
2092 | extraFolder.ParentID = clothingFolder.ID; | 2114 | extraFolder.ParentID = clothingFolder.ID; |
2093 | inventoryService.AddFolder(extraFolder); | 2115 | inventoryService.AddFolder(extraFolder); |
2094 | m_log.DebugFormat("[RADMIN] Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID); | 2116 | m_log.DebugFormat("[RADMIN]: Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID); |
2095 | } | 2117 | } |
2096 | 2118 | ||
2097 | // Now get the pieces that make up the outfit | 2119 | // Now get the pieces that make up the outfit |
@@ -2106,7 +2128,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2106 | switch (child.Name) | 2128 | switch (child.Name) |
2107 | { | 2129 | { |
2108 | case "Permissions" : | 2130 | case "Permissions" : |
2109 | m_log.DebugFormat("[RADMIN] Permissions specified"); | 2131 | m_log.DebugFormat("[RADMIN]: Permissions specified"); |
2110 | perms = child; | 2132 | perms = child; |
2111 | break; | 2133 | break; |
2112 | case "Asset" : | 2134 | case "Asset" : |
@@ -2156,7 +2178,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2156 | inventoryItem.Folder = extraFolder.ID; // Parent folder | 2178 | inventoryItem.Folder = extraFolder.ID; // Parent folder |
2157 | 2179 | ||
2158 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(inventoryItem); | 2180 | m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(inventoryItem); |
2159 | m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID); | 2181 | m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID); |
2160 | } | 2182 | } |
2161 | 2183 | ||
2162 | // Attach item, if attachpoint is specified | 2184 | // Attach item, if attachpoint is specified |
@@ -2164,7 +2186,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2164 | if (attachpoint != 0) | 2186 | if (attachpoint != 0) |
2165 | { | 2187 | { |
2166 | avatarAppearance.SetAttachment(attachpoint, inventoryItem.ID, inventoryItem.AssetID); | 2188 | avatarAppearance.SetAttachment(attachpoint, inventoryItem.ID, inventoryItem.AssetID); |
2167 | m_log.DebugFormat("[RADMIN] Attached {0}", inventoryItem.ID); | 2189 | m_log.DebugFormat("[RADMIN]: Attached {0}", inventoryItem.ID); |
2168 | } | 2190 | } |
2169 | 2191 | ||
2170 | // Record whether or not the item is to be initially worn | 2192 | // Record whether or not the item is to be initially worn |
@@ -2177,32 +2199,32 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2177 | } | 2199 | } |
2178 | catch (Exception e) | 2200 | catch (Exception e) |
2179 | { | 2201 | { |
2180 | m_log.WarnFormat("[RADMIN] Error wearing item {0} : {1}", inventoryItem.ID, e.Message); | 2202 | m_log.WarnFormat("[RADMIN]: Error wearing item {0} : {1}", inventoryItem.ID, e.Message); |
2181 | } | 2203 | } |
2182 | } // foreach item in outfit | 2204 | } // foreach item in outfit |
2183 | m_log.DebugFormat("[RADMIN] Outfit {0} load completed", outfitName); | 2205 | m_log.DebugFormat("[RADMIN]: Outfit {0} load completed", outfitName); |
2184 | } // foreach outfit | 2206 | } // foreach outfit |
2185 | m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name); | 2207 | m_log.DebugFormat("[RADMIN]: Inventory update complete for {0}", name); |
2186 | scene.AvatarService.SetAppearance(ID, avatarAppearance); | 2208 | scene.AvatarService.SetAppearance(ID, avatarAppearance); |
2187 | } | 2209 | } |
2188 | catch (Exception e) | 2210 | catch (Exception e) |
2189 | { | 2211 | { |
2190 | m_log.WarnFormat("[RADMIN] Inventory processing incomplete for user {0} : {1}", | 2212 | m_log.WarnFormat("[RADMIN]: Inventory processing incomplete for user {0} : {1}", |
2191 | name, e.Message); | 2213 | name, e.Message); |
2192 | } | 2214 | } |
2193 | } // End of include | 2215 | } // End of include |
2194 | } | 2216 | } |
2195 | m_log.DebugFormat("[RADMIN] Default avatar loading complete"); | 2217 | m_log.DebugFormat("[RADMIN]: Default avatar loading complete"); |
2196 | } | 2218 | } |
2197 | else | 2219 | else |
2198 | { | 2220 | { |
2199 | m_log.DebugFormat("[RADMIN] No default avatar information available"); | 2221 | m_log.DebugFormat("[RADMIN]: No default avatar information available"); |
2200 | return false; | 2222 | return false; |
2201 | } | 2223 | } |
2202 | } | 2224 | } |
2203 | catch (Exception e) | 2225 | catch (Exception e) |
2204 | { | 2226 | { |
2205 | m_log.WarnFormat("[RADMIN] Exception whilst loading default avatars ; {0}", e.Message); | 2227 | m_log.WarnFormat("[RADMIN]: Exception whilst loading default avatars ; {0}", e.Message); |
2206 | return false; | 2228 | return false; |
2207 | } | 2229 | } |
2208 | 2230 | ||
@@ -2297,8 +2319,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2297 | } | 2319 | } |
2298 | catch (Exception e) | 2320 | catch (Exception e) |
2299 | { | 2321 | { |
2300 | m_log.InfoFormat("[RADMIN] LoadOAR: {0}", e.Message); | 2322 | m_log.ErrorFormat("[RADMIN]: LoadOAR: {0} {1}", e.Message, e.StackTrace); |
2301 | m_log.DebugFormat("[RADMIN] LoadOAR: {0}", e.ToString()); | ||
2302 | 2323 | ||
2303 | responseData["loaded"] = false; | 2324 | responseData["loaded"] = false; |
2304 | responseData["error"] = e.Message; | 2325 | responseData["error"] = e.Message; |
@@ -2403,8 +2424,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2403 | } | 2424 | } |
2404 | catch (Exception e) | 2425 | catch (Exception e) |
2405 | { | 2426 | { |
2406 | m_log.InfoFormat("[RADMIN] SaveOAR: {0}", e.Message); | 2427 | m_log.ErrorFormat("[RADMIN]: SaveOAR: {0} {1}", e.Message, e.StackTrace); |
2407 | m_log.DebugFormat("[RADMIN] SaveOAR: {0}", e.ToString()); | ||
2408 | 2428 | ||
2409 | responseData["saved"] = false; | 2429 | responseData["saved"] = false; |
2410 | responseData["error"] = e.Message; | 2430 | responseData["error"] = e.Message; |
@@ -2418,7 +2438,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2418 | 2438 | ||
2419 | private void RemoteAdminOarSaveCompleted(Guid uuid, string name) | 2439 | private void RemoteAdminOarSaveCompleted(Guid uuid, string name) |
2420 | { | 2440 | { |
2421 | m_log.DebugFormat("[RADMIN] File processing complete for {0}", name); | 2441 | m_log.DebugFormat("[RADMIN]: File processing complete for {0}", name); |
2422 | lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock); | 2442 | lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock); |
2423 | } | 2443 | } |
2424 | 2444 | ||
@@ -2456,14 +2476,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2456 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2476 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2457 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2477 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2458 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2478 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2459 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2479 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2460 | } | 2480 | } |
2461 | else if (requestData.Contains("region_name")) | 2481 | else if (requestData.Contains("region_name")) |
2462 | { | 2482 | { |
2463 | string region_name = (string) requestData["region_name"]; | 2483 | string region_name = (string) requestData["region_name"]; |
2464 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2484 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2465 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2485 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2466 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2486 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2467 | } | 2487 | } |
2468 | else throw new Exception("neither region_name nor region_uuid given"); | 2488 | else throw new Exception("neither region_name nor region_uuid given"); |
2469 | 2489 | ||
@@ -2494,8 +2514,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2494 | } | 2514 | } |
2495 | catch (Exception e) | 2515 | catch (Exception e) |
2496 | { | 2516 | { |
2497 | m_log.InfoFormat("[RADMIN] LoadXml: {0}", e.Message); | 2517 | m_log.ErrorFormat("[RADMIN] LoadXml: {0} {1}", e.Message, e.StackTrace); |
2498 | m_log.DebugFormat("[RADMIN] LoadXml: {0}", e.ToString()); | ||
2499 | 2518 | ||
2500 | responseData["loaded"] = false; | 2519 | responseData["loaded"] = false; |
2501 | responseData["switched"] = false; | 2520 | responseData["switched"] = false; |
@@ -2541,14 +2560,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2541 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2560 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2542 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2561 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2543 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2562 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2544 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2563 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2545 | } | 2564 | } |
2546 | else if (requestData.Contains("region_name")) | 2565 | else if (requestData.Contains("region_name")) |
2547 | { | 2566 | { |
2548 | string region_name = (string) requestData["region_name"]; | 2567 | string region_name = (string) requestData["region_name"]; |
2549 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2568 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2550 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2569 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2551 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2570 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2552 | } | 2571 | } |
2553 | else throw new Exception("neither region_name nor region_uuid given"); | 2572 | else throw new Exception("neither region_name nor region_uuid given"); |
2554 | 2573 | ||
@@ -2580,8 +2599,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2580 | } | 2599 | } |
2581 | catch (Exception e) | 2600 | catch (Exception e) |
2582 | { | 2601 | { |
2583 | m_log.InfoFormat("[RADMIN] SaveXml: {0}", e.Message); | 2602 | m_log.ErrorFormat("[RADMIN]: SaveXml: {0} {1}", e.Message, e.StackTrace); |
2584 | m_log.DebugFormat("[RADMIN] SaveXml: {0}", e.ToString()); | ||
2585 | 2603 | ||
2586 | responseData["saved"] = false; | 2604 | responseData["saved"] = false; |
2587 | responseData["switched"] = false; | 2605 | responseData["switched"] = false; |
@@ -2620,14 +2638,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2620 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2638 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2621 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2639 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2622 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2640 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2623 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2641 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2624 | } | 2642 | } |
2625 | else if (requestData.Contains("region_name")) | 2643 | else if (requestData.Contains("region_name")) |
2626 | { | 2644 | { |
2627 | string region_name = (string) requestData["region_name"]; | 2645 | string region_name = (string) requestData["region_name"]; |
2628 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2646 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2629 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2647 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2630 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2648 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2631 | } | 2649 | } |
2632 | else throw new Exception("neither region_name nor region_uuid given"); | 2650 | else throw new Exception("neither region_name nor region_uuid given"); |
2633 | 2651 | ||
@@ -2643,7 +2661,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2643 | } | 2661 | } |
2644 | catch (Exception e) | 2662 | catch (Exception e) |
2645 | { | 2663 | { |
2646 | m_log.InfoFormat("[RADMIN] RegionQuery: {0}", e.Message); | 2664 | m_log.InfoFormat("[RADMIN]: RegionQuery: {0}", e.Message); |
2647 | 2665 | ||
2648 | responseData["success"] = false; | 2666 | responseData["success"] = false; |
2649 | responseData["error"] = e.Message; | 2667 | responseData["error"] = e.Message; |
@@ -2684,7 +2702,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2684 | } | 2702 | } |
2685 | catch (Exception e) | 2703 | catch (Exception e) |
2686 | { | 2704 | { |
2687 | m_log.InfoFormat("[RADMIN] ConsoleCommand: {0}", e.Message); | 2705 | m_log.InfoFormat("[RADMIN]: ConsoleCommand: {0}", e.Message); |
2688 | 2706 | ||
2689 | responseData["success"] = false; | 2707 | responseData["success"] = false; |
2690 | responseData["error"] = e.Message; | 2708 | responseData["error"] = e.Message; |
@@ -2721,14 +2739,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2721 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2739 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2722 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2740 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2723 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2741 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2724 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2742 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2725 | } | 2743 | } |
2726 | else if (requestData.Contains("region_name")) | 2744 | else if (requestData.Contains("region_name")) |
2727 | { | 2745 | { |
2728 | string region_name = (string) requestData["region_name"]; | 2746 | string region_name = (string) requestData["region_name"]; |
2729 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2747 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2730 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2748 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2731 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2749 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2732 | } | 2750 | } |
2733 | else throw new Exception("neither region_name nor region_uuid given"); | 2751 | else throw new Exception("neither region_name nor region_uuid given"); |
2734 | 2752 | ||
@@ -2739,7 +2757,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2739 | } | 2757 | } |
2740 | catch (Exception e) | 2758 | catch (Exception e) |
2741 | { | 2759 | { |
2742 | m_log.InfoFormat("[RADMIN] Access List Clear Request: {0}", e.Message); | 2760 | m_log.ErrorFormat("[RADMIN]: Access List Clear Request: {0} {1}", e.Message, e.StackTrace); |
2743 | 2761 | ||
2744 | responseData["success"] = false; | 2762 | responseData["success"] = false; |
2745 | responseData["error"] = e.Message; | 2763 | responseData["error"] = e.Message; |
@@ -2778,14 +2796,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2778 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2796 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2779 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2797 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2780 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2798 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2781 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2799 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2782 | } | 2800 | } |
2783 | else if (requestData.Contains("region_name")) | 2801 | else if (requestData.Contains("region_name")) |
2784 | { | 2802 | { |
2785 | string region_name = (string) requestData["region_name"]; | 2803 | string region_name = (string) requestData["region_name"]; |
2786 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2804 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2787 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2805 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2788 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2806 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2789 | } | 2807 | } |
2790 | else throw new Exception("neither region_name nor region_uuid given"); | 2808 | else throw new Exception("neither region_name nor region_uuid given"); |
2791 | 2809 | ||
@@ -2805,7 +2823,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2805 | if (account != null) | 2823 | if (account != null) |
2806 | { | 2824 | { |
2807 | uuids.Add(account.PrincipalID); | 2825 | uuids.Add(account.PrincipalID); |
2808 | m_log.DebugFormat("[RADMIN] adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName); | 2826 | m_log.DebugFormat("[RADMIN]: adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName); |
2809 | } | 2827 | } |
2810 | } | 2828 | } |
2811 | List<UUID> accessControlList = new List<UUID>(scene.RegionInfo.EstateSettings.EstateAccess); | 2829 | List<UUID> accessControlList = new List<UUID>(scene.RegionInfo.EstateSettings.EstateAccess); |
@@ -2826,7 +2844,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2826 | } | 2844 | } |
2827 | catch (Exception e) | 2845 | catch (Exception e) |
2828 | { | 2846 | { |
2829 | m_log.InfoFormat("[RADMIN] Access List Add Request: {0}", e.Message); | 2847 | m_log.ErrorFormat("[RADMIN]: Access List Add Request: {0} {1}", e.Message, e.StackTrace); |
2830 | 2848 | ||
2831 | responseData["success"] = false; | 2849 | responseData["success"] = false; |
2832 | responseData["error"] = e.Message; | 2850 | responseData["error"] = e.Message; |
@@ -2865,14 +2883,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2865 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2883 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2866 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2884 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2867 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2885 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2868 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2886 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2869 | } | 2887 | } |
2870 | else if (requestData.Contains("region_name")) | 2888 | else if (requestData.Contains("region_name")) |
2871 | { | 2889 | { |
2872 | string region_name = (string) requestData["region_name"]; | 2890 | string region_name = (string) requestData["region_name"]; |
2873 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2891 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2874 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2892 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2875 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2893 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2876 | } | 2894 | } |
2877 | else throw new Exception("neither region_name nor region_uuid given"); | 2895 | else throw new Exception("neither region_name nor region_uuid given"); |
2878 | 2896 | ||
@@ -2913,7 +2931,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2913 | } | 2931 | } |
2914 | catch (Exception e) | 2932 | catch (Exception e) |
2915 | { | 2933 | { |
2916 | m_log.InfoFormat("[RADMIN] Access List Remove Request: {0}", e.Message); | 2934 | m_log.ErrorFormat("[RADMIN]: Access List Remove Request: {0} {1}", e.Message, e.StackTrace); |
2917 | 2935 | ||
2918 | responseData["success"] = false; | 2936 | responseData["success"] = false; |
2919 | responseData["error"] = e.Message; | 2937 | responseData["error"] = e.Message; |
@@ -2952,14 +2970,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2952 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; | 2970 | UUID region_uuid = (UUID) (string) requestData["region_uuid"]; |
2953 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) | 2971 | if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) |
2954 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); | 2972 | throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); |
2955 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); | 2973 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_uuid.ToString()); |
2956 | } | 2974 | } |
2957 | else if (requestData.Contains("region_name")) | 2975 | else if (requestData.Contains("region_name")) |
2958 | { | 2976 | { |
2959 | string region_name = (string) requestData["region_name"]; | 2977 | string region_name = (string) requestData["region_name"]; |
2960 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) | 2978 | if (!m_application.SceneManager.TrySetCurrentScene(region_name)) |
2961 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); | 2979 | throw new Exception(String.Format("failed to switch to region {0}", region_name)); |
2962 | m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); | 2980 | m_log.InfoFormat("[RADMIN]: Switched to region {0}", region_name); |
2963 | } | 2981 | } |
2964 | else throw new Exception("neither region_name nor region_uuid given"); | 2982 | else throw new Exception("neither region_name nor region_uuid given"); |
2965 | 2983 | ||
@@ -2981,7 +2999,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2981 | } | 2999 | } |
2982 | catch (Exception e) | 3000 | catch (Exception e) |
2983 | { | 3001 | { |
2984 | m_log.InfoFormat("[RADMIN] Acces List List: {0}", e.Message); | 3002 | m_log.ErrorFormat("[RADMIN]: Access List List: {0} {1}", e.Message, e.StackTrace); |
2985 | 3003 | ||
2986 | responseData["success"] = false; | 3004 | responseData["success"] = false; |
2987 | responseData["error"] = e.Message; | 3005 | responseData["error"] = e.Message; |