aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs35
1 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 1b4d1ea..c6b34f9 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -1587,6 +1587,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1587 { 1587 {
1588 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); 1588 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
1589 destinationItem.Name = item.Name; 1589 destinationItem.Name = item.Name;
1590 destinationItem.Owner = destination;
1590 destinationItem.Description = item.Description; 1591 destinationItem.Description = item.Description;
1591 destinationItem.InvType = item.InvType; 1592 destinationItem.InvType = item.InvType;
1592 destinationItem.CreatorId = item.CreatorId; 1593 destinationItem.CreatorId = item.CreatorId;
@@ -1606,6 +1607,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1606 destinationItem.Flags = item.Flags; 1607 destinationItem.Flags = item.Flags;
1607 destinationItem.CreationDate = item.CreationDate; 1608 destinationItem.CreationDate = item.CreationDate;
1608 destinationItem.Folder = destinationFolder.ID; 1609 destinationItem.Folder = destinationFolder.ID;
1610 ApplyNextOwnerPermissions(destinationItem);
1609 1611
1610 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); 1612 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
1611 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); 1613 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID);
@@ -1640,6 +1642,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1640 { 1642 {
1641 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); 1643 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
1642 destinationItem.Name = item.Name; 1644 destinationItem.Name = item.Name;
1645 destinationItem.Owner = destination;
1643 destinationItem.Description = item.Description; 1646 destinationItem.Description = item.Description;
1644 destinationItem.InvType = item.InvType; 1647 destinationItem.InvType = item.InvType;
1645 destinationItem.CreatorId = item.CreatorId; 1648 destinationItem.CreatorId = item.CreatorId;
@@ -1659,6 +1662,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1659 destinationItem.Flags = item.Flags; 1662 destinationItem.Flags = item.Flags;
1660 destinationItem.CreationDate = item.CreationDate; 1663 destinationItem.CreationDate = item.CreationDate;
1661 destinationItem.Folder = destinationFolder.ID; 1664 destinationItem.Folder = destinationFolder.ID;
1665 ApplyNextOwnerPermissions(destinationItem);
1662 1666
1663 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); 1667 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
1664 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); 1668 m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID);
@@ -1716,7 +1720,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1716 { 1720 {
1717 destinationFolder = new InventoryFolderBase(); 1721 destinationFolder = new InventoryFolderBase();
1718 destinationFolder.ID = UUID.Random(); 1722 destinationFolder.ID = UUID.Random();
1719 destinationFolder.Name = assetType.ToString(); 1723 if (assetType == AssetType.Clothing) {
1724 destinationFolder.Name = "Clothing";
1725 } else {
1726 destinationFolder.Name = "Body Parts";
1727 }
1720 destinationFolder.Owner = destination; 1728 destinationFolder.Owner = destination;
1721 destinationFolder.Type = (short)assetType; 1729 destinationFolder.Type = (short)assetType;
1722 destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; 1730 destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID;
@@ -1748,6 +1756,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1748 { 1756 {
1749 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); 1757 InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination);
1750 destinationItem.Name = item.Name; 1758 destinationItem.Name = item.Name;
1759 destinationItem.Owner = destination;
1751 destinationItem.Description = item.Description; 1760 destinationItem.Description = item.Description;
1752 destinationItem.InvType = item.InvType; 1761 destinationItem.InvType = item.InvType;
1753 destinationItem.CreatorId = item.CreatorId; 1762 destinationItem.CreatorId = item.CreatorId;
@@ -1767,6 +1776,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1767 destinationItem.Flags = item.Flags; 1776 destinationItem.Flags = item.Flags;
1768 destinationItem.CreationDate = item.CreationDate; 1777 destinationItem.CreationDate = item.CreationDate;
1769 destinationItem.Folder = extraFolder.ID; 1778 destinationItem.Folder = extraFolder.ID;
1779 ApplyNextOwnerPermissions(destinationItem);
1770 1780
1771 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); 1781 m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem);
1772 inventoryMap.Add(item.ID, destinationItem.ID); 1782 inventoryMap.Add(item.ID, destinationItem.ID);
@@ -1784,6 +1794,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1784 } 1794 }
1785 1795
1786 /// <summary> 1796 /// <summary>
1797 /// Apply next owner permissions.
1798 /// </summary>
1799
1800 private void ApplyNextOwnerPermissions(InventoryItemBase item)
1801 {
1802 if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0)
1803 {
1804 if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
1805 item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
1806 if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
1807 item.CurrentPermissions &= ~(uint)PermissionMask.Transfer;
1808 if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
1809 item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
1810 }
1811 item.CurrentPermissions &= item.NextPermissions;
1812 item.BasePermissions &= item.NextPermissions;
1813 item.EveryOnePermissions &= item.NextPermissions;
1814 // item.OwnerChanged = true;
1815 // item.PermsMask = 0;
1816 // item.PermsGranter = UUID.Zero;
1817 }
1818
1819 /// <summary>
1787 /// This method is called if a given model avatar name can not be found. If the external 1820 /// 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 1821 /// 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 1822 /// looks for a default appearance file. This file contains XML definitions of zero or more named