diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 67732ff..1ebccd1 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -53,6 +53,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
53 | 53 | ||
54 | protected bool m_Enabled = false; | 54 | protected bool m_Enabled = false; |
55 | protected Scene m_Scene; | 55 | protected Scene m_Scene; |
56 | protected IUserManagement m_UserManagement; | ||
57 | protected IUserManagement UserManagementModule | ||
58 | { | ||
59 | get | ||
60 | { | ||
61 | if (m_UserManagement == null) | ||
62 | m_UserManagement = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
63 | return m_UserManagement; | ||
64 | } | ||
65 | } | ||
66 | |||
56 | 67 | ||
57 | #region INonSharedRegionModule | 68 | #region INonSharedRegionModule |
58 | 69 | ||
@@ -542,6 +553,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
542 | SceneObjectGroup group | 553 | SceneObjectGroup group |
543 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); | 554 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); |
544 | 555 | ||
556 | Util.FireAndForget(delegate { AddUserData(group); }); | ||
557 | |||
545 | group.RootPart.FromFolderID = item.Folder; | 558 | group.RootPart.FromFolderID = item.Folder; |
546 | 559 | ||
547 | // If it's rezzed in world, select it. Much easier to | 560 | // If it's rezzed in world, select it. Much easier to |
@@ -699,6 +712,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
699 | return null; | 712 | return null; |
700 | } | 713 | } |
701 | 714 | ||
715 | protected void AddUserData(SceneObjectGroup sog) | ||
716 | { | ||
717 | UserManagementModule.AddUser(sog.RootPart.CreatorID, sog.RootPart.CreatorData); | ||
718 | foreach (SceneObjectPart sop in sog.Parts) | ||
719 | UserManagementModule.AddUser(sop.CreatorID, sop.CreatorData); | ||
720 | } | ||
721 | |||
702 | public virtual void TransferInventoryAssets(InventoryItemBase item, UUID sender, UUID receiver) | 722 | public virtual void TransferInventoryAssets(InventoryItemBase item, UUID sender, UUID receiver) |
703 | { | 723 | { |
704 | } | 724 | } |
@@ -779,9 +799,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
779 | protected virtual InventoryItemBase GetItem(UUID agentID, UUID itemID) | 799 | protected virtual InventoryItemBase GetItem(UUID agentID, UUID itemID) |
780 | { | 800 | { |
781 | IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); | 801 | IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); |
782 | InventoryItemBase assetRequestItem = new InventoryItemBase(itemID, agentID); | 802 | InventoryItemBase item = new InventoryItemBase(itemID, agentID); |
783 | assetRequestItem = invService.GetItem(assetRequestItem); | 803 | item = invService.GetItem(item); |
784 | return assetRequestItem; | 804 | |
805 | if (item.CreatorData != null && item.CreatorData != string.Empty) | ||
806 | UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
807 | |||
808 | return item; | ||
785 | } | 809 | } |
786 | 810 | ||
787 | #endregion | 811 | #endregion |