aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorMelanie2012-08-14 16:51:47 +0100
committerMelanie2012-08-14 16:51:47 +0100
commite81e26498bf10e34887a80c9629d356016408242 (patch)
treee6e3948cfc472d9ee6c02ef16c0f22c68aa871f5 /OpenSim/Region/OptionalModules
parentMerge branch 'master' into careminster (diff)
parentPerform ownership transfer and permission propagation as well as needed (diff)
downloadopensim-SC_OLD-e81e26498bf10e34887a80c9629d356016408242.zip
opensim-SC_OLD-e81e26498bf10e34887a80c9629d356016408242.tar.gz
opensim-SC_OLD-e81e26498bf10e34887a80c9629d356016408242.tar.bz2
opensim-SC_OLD-e81e26498bf10e34887a80c9629d356016408242.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs44
1 files changed, 36 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index b166588..68a484a 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -59,6 +59,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
59 59
60 public void AddRegion(Scene scene) 60 public void AddRegion(Scene scene)
61 { 61 {
62 }
63
64 public void RemoveRegion(Scene scene)
65 {
66 }
67
68 public void RegionLoaded(Scene scene)
69 {
62 m_scene = scene; 70 m_scene = scene;
63 71
64 IScriptModuleComms comms = scene.RequestModuleInterface<IScriptModuleComms>(); 72 IScriptModuleComms comms = scene.RequestModuleInterface<IScriptModuleComms>();
@@ -73,14 +81,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
73 } 81 }
74 } 82 }
75 83
76 public void RemoveRegion(Scene scene)
77 {
78 }
79
80 public void RegionLoaded(Scene scene)
81 {
82 }
83
84 public void Close() 84 public void Close()
85 { 85 {
86 } 86 }
@@ -120,6 +120,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
120 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) 120 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target))
121 return; 121 return;
122 122
123 if (target.UUID != hostPart.ParentGroup.OwnerID)
124 {
125 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions();
126
127 if ((effectivePerms & (uint)PermissionMask.Transfer) == 0)
128 return;
129
130 hostPart.ParentGroup.SetOwnerId(target.UUID);
131 hostPart.ParentGroup.SetRootPartOwner(hostPart.ParentGroup.RootPart, target.UUID, target.ControllingClient.ActiveGroupId);
132
133 if (m_scene.Permissions.PropagatePermissions())
134 {
135 foreach (SceneObjectPart child in hostPart.ParentGroup.Parts)
136 {
137 child.Inventory.ChangeInventoryOwner(target.UUID);
138 child.TriggerScriptChangedEvent(Changed.OWNER);
139 child.ApplyNextOwnerPermissions();
140 }
141 }
142
143 hostPart.ParentGroup.RootPart.ObjectSaleType = 0;
144 hostPart.ParentGroup.RootPart.SalePrice = 10;
145
146 hostPart.ParentGroup.HasGroupChanged = true;
147 hostPart.ParentGroup.RootPart.SendPropertiesToClient(target.ControllingClient);
148 hostPart.ParentGroup.RootPart.ScheduleFullUpdate();
149 }
150
123 attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, true, true); 151 attachmentsModule.AttachObject(target, hostPart.ParentGroup, (uint)attachmentPoint, false, true, true);
124 } 152 }
125 } 153 }