diff options
author | UbitUmarov | 2014-07-16 16:22:32 +0100 |
---|---|---|
committer | UbitUmarov | 2014-07-16 16:22:32 +0100 |
commit | 19d33c571d8f48501ecb2409814d5b95b2b4be23 (patch) | |
tree | 8e08805a71ebea81de75b5805105f325e0defa0f /OpenSim/Region/CoreModules | |
parent | Merge branch 'avination-current' into ubitwork (diff) | |
parent | Merge branch 'avination-current' of ssh://3dhosting.de/var/git/careminster in... (diff) | |
download | opensim-SC_OLD-19d33c571d8f48501ecb2409814d5b95b2b4be23.zip opensim-SC_OLD-19d33c571d8f48501ecb2409814d5b95b2b4be23.tar.gz opensim-SC_OLD-19d33c571d8f48501ecb2409814d5b95b2b4be23.tar.bz2 opensim-SC_OLD-19d33c571d8f48501ecb2409814d5b95b2b4be23.tar.xz |
Merge branch 'avination-current' into ubitwork
Diffstat (limited to 'OpenSim/Region/CoreModules')
8 files changed, 90 insertions, 39 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f2f789b..6495f3f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -302,7 +302,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
302 | // If we're an NPC then skip all the item checks and manipulations since we don't have an | 302 | // If we're an NPC then skip all the item checks and manipulations since we don't have an |
303 | // inventory right now. | 303 | // inventory right now. |
304 | RezSingleAttachmentFromInventoryInternal( | 304 | RezSingleAttachmentFromInventoryInternal( |
305 | sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, p, true, null); | 305 | sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, p, true, d); |
306 | } | 306 | } |
307 | catch (Exception e) | 307 | catch (Exception e) |
308 | { | 308 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 343cdb5..c52d586 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
182 | try | 182 | try |
183 | { | 183 | { |
184 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 184 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
185 | if (obj == null) | ||
186 | return; | ||
185 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 | 187 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 |
186 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) | 188 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) |
187 | { | 189 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 2d46276..41958b3 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -40,6 +40,13 @@ using OpenSim.Region.Framework.Scenes; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
42 | { | 42 | { |
43 | public struct SendReply | ||
44 | { | ||
45 | public bool Success; | ||
46 | public string Message; | ||
47 | public int Disposition; | ||
48 | } | ||
49 | |||
43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] |
44 | public class OfflineMessageModule : ISharedRegionModule | 51 | public class OfflineMessageModule : ISharedRegionModule |
45 | { | 52 | { |
@@ -50,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
50 | private string m_RestURL = String.Empty; | 57 | private string m_RestURL = String.Empty; |
51 | IMessageTransferModule m_TransferModule = null; | 58 | IMessageTransferModule m_TransferModule = null; |
52 | private bool m_ForwardOfflineGroupMessages = true; | 59 | private bool m_ForwardOfflineGroupMessages = true; |
60 | private Dictionary<IClientAPI, List<UUID>> m_repliesSent= new Dictionary<IClientAPI, List<UUID>>(); | ||
53 | 61 | ||
54 | public void Initialise(IConfigSource config) | 62 | public void Initialise(IConfigSource config) |
55 | { | 63 | { |
@@ -169,6 +177,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
169 | private void OnNewClient(IClientAPI client) | 177 | private void OnNewClient(IClientAPI client) |
170 | { | 178 | { |
171 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; | 179 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; |
180 | client.OnLogout += OnClientLoggedOut; | ||
181 | } | ||
182 | |||
183 | public void OnClientLoggedOut(IClientAPI client) | ||
184 | { | ||
185 | m_repliesSent.Remove(client); | ||
172 | } | 186 | } |
173 | 187 | ||
174 | private void RetrieveInstantMessages(IClientAPI client) | 188 | private void RetrieveInstantMessages(IClientAPI client) |
@@ -228,7 +242,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
228 | if (scene == null) | 242 | if (scene == null) |
229 | scene = m_SceneList[0]; | 243 | scene = m_SceneList[0]; |
230 | 244 | ||
231 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 245 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
232 | "POST", m_RestURL+"/SaveMessage/?scope=" + | 246 | "POST", m_RestURL+"/SaveMessage/?scope=" + |
233 | scene.RegionInfo.ScopeID.ToString(), im); | 247 | scene.RegionInfo.ScopeID.ToString(), im); |
234 | 248 | ||
@@ -238,13 +252,38 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
238 | if (client == null) | 252 | if (client == null) |
239 | return; | 253 | return; |
240 | 254 | ||
241 | client.SendInstantMessage(new GridInstantMessage( | 255 | if (reply.Message == String.Empty) |
242 | null, new UUID(im.toAgentID), | 256 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); |
243 | "System", new UUID(im.fromAgentID), | 257 | |
244 | (byte)InstantMessageDialog.MessageFromAgent, | 258 | bool sendReply = true; |
245 | "User is not logged in. "+ | 259 | |
246 | (success ? "Message saved." : "Message not saved"), | 260 | switch (reply.Disposition) |
247 | false, new Vector3())); | 261 | { |
262 | case 0: // Normal | ||
263 | break; | ||
264 | case 1: // Only once per user | ||
265 | if (m_repliesSent.ContainsKey(client) && m_repliesSent[client].Contains(new UUID(im.toAgentID))) | ||
266 | { | ||
267 | sendReply = false; | ||
268 | } | ||
269 | else | ||
270 | { | ||
271 | if (!m_repliesSent.ContainsKey(client)) | ||
272 | m_repliesSent[client] = new List<UUID>(); | ||
273 | m_repliesSent[client].Add(new UUID(im.toAgentID)); | ||
274 | } | ||
275 | break; | ||
276 | } | ||
277 | |||
278 | if (sendReply) | ||
279 | { | ||
280 | client.SendInstantMessage(new GridInstantMessage( | ||
281 | null, new UUID(im.toAgentID), | ||
282 | "System", new UUID(im.fromAgentID), | ||
283 | (byte)InstantMessageDialog.MessageFromAgent, | ||
284 | reply.Message, | ||
285 | false, new Vector3())); | ||
286 | } | ||
248 | } | 287 | } |
249 | } | 288 | } |
250 | } | 289 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index a606d76..193a27b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
265 | return UUID.Zero; | 265 | return UUID.Zero; |
266 | } | 266 | } |
267 | 267 | ||
268 | remoteClient.SendAgentAlertMessage("Notecard saved", false); | 268 | remoteClient.SendAlertMessage("Notecard saved"); |
269 | } | 269 | } |
270 | else if ((InventoryType)item.InvType == InventoryType.LSL) | 270 | else if ((InventoryType)item.InvType == InventoryType.LSL) |
271 | { | 271 | { |
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
275 | return UUID.Zero; | 275 | return UUID.Zero; |
276 | } | 276 | } |
277 | 277 | ||
278 | remoteClient.SendAgentAlertMessage("Script saved", false); | 278 | remoteClient.SendAlertMessage("Script saved"); |
279 | } | 279 | } |
280 | 280 | ||
281 | AssetBase asset = | 281 | AssetBase asset = |
@@ -799,6 +799,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
799 | XmlDocument doc = new XmlDocument(); | 799 | XmlDocument doc = new XmlDocument(); |
800 | doc.LoadXml(xmlData); | 800 | doc.LoadXml(xmlData); |
801 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | 801 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); |
802 | Vector3 rez_pos; | ||
802 | if (e == null || attachment) // Single | 803 | if (e == null || attachment) // Single |
803 | { | 804 | { |
804 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 805 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); |
@@ -820,6 +821,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
820 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, | 821 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, |
821 | BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); | 822 | BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); |
822 | pos.Z += offsetHeight; | 823 | pos.Z += offsetHeight; |
824 | rez_pos = pos; | ||
823 | } | 825 | } |
824 | else | 826 | else |
825 | { | 827 | { |
@@ -834,6 +836,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
834 | BypassRayCast, bRayEndIsIntersection, true, | 836 | BypassRayCast, bRayEndIsIntersection, true, |
835 | bbox, false); | 837 | bbox, false); |
836 | 838 | ||
839 | rez_pos = pos; | ||
840 | |||
837 | pos -= bbox / 2; | 841 | pos -= bbox / 2; |
838 | 842 | ||
839 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | 843 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); |
@@ -870,7 +874,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
870 | primcount += g.PrimCount; | 874 | primcount += g.PrimCount; |
871 | 875 | ||
872 | if (!m_Scene.Permissions.CanRezObject( | 876 | if (!m_Scene.Permissions.CanRezObject( |
873 | primcount, remoteClient.AgentId, pos) | 877 | primcount, remoteClient.AgentId, rez_pos) |
874 | && !attachment) | 878 | && !attachment) |
875 | { | 879 | { |
876 | // The client operates in no fail mode. It will | 880 | // The client operates in no fail mode. It will |
@@ -887,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
887 | return null; | 891 | return null; |
888 | } | 892 | } |
889 | 893 | ||
890 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment)) | 894 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, rez_pos, attachment)) |
891 | return null; | 895 | return null; |
892 | 896 | ||
893 | for (int i = 0; i < objlist.Count; i++) | 897 | for (int i = 0; i < objlist.Count; i++) |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index a5f5749..834fd77 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -96,6 +96,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
96 | 96 | ||
97 | m_commands = new EstateManagementCommands(this); | 97 | m_commands = new EstateManagementCommands(this); |
98 | m_commands.Initialise(); | 98 | m_commands.Initialise(); |
99 | |||
100 | m_regionChangeTimer.Interval = 10000; | ||
101 | m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; | ||
102 | m_regionChangeTimer.AutoReset = false; | ||
99 | } | 103 | } |
100 | 104 | ||
101 | public void RemoveRegion(Scene scene) {} | 105 | public void RemoveRegion(Scene scene) {} |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index c307998..4e21724 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -565,7 +565,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
565 | requiredPowers = GroupPowers.LandManageBanned; | 565 | requiredPowers = GroupPowers.LandManageBanned; |
566 | 566 | ||
567 | if (m_scene.Permissions.CanEditParcelProperties(agentID, | 567 | if (m_scene.Permissions.CanEditParcelProperties(agentID, |
568 | land, requiredPowers)) | 568 | land, requiredPowers, false)) |
569 | { | 569 | { |
570 | land.UpdateAccessList(flags, transactionID, sequenceID, | 570 | land.UpdateAccessList(flags, transactionID, sequenceID, |
571 | sections, entries, remote_client); | 571 | sections, entries, remote_client); |
@@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
927 | 927 | ||
928 | //If we are still here, then they are subdividing within one piece of land | 928 | //If we are still here, then they are subdividing within one piece of land |
929 | //Check owner | 929 | //Check owner |
930 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin)) | 930 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin, true)) |
931 | { | 931 | { |
932 | return; | 932 | return; |
933 | } | 933 | } |
@@ -996,7 +996,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
996 | { | 996 | { |
997 | return; | 997 | return; |
998 | } | 998 | } |
999 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin)) | 999 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin, true)) |
1000 | { | 1000 | { |
1001 | return; | 1001 | return; |
1002 | } | 1002 | } |
@@ -1727,7 +1727,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1727 | 1727 | ||
1728 | if (land == null) return; | 1728 | if (land == null) return; |
1729 | 1729 | ||
1730 | if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions)) | 1730 | if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions, false)) |
1731 | return; | 1731 | return; |
1732 | 1732 | ||
1733 | land.LandData.OtherCleanTime = otherCleanTime; | 1733 | land.LandData.OtherCleanTime = otherCleanTime; |
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1827 | if (targetAvatar.UserLevel == 0) | 1827 | if (targetAvatar.UserLevel == 0) |
1828 | { | 1828 | { |
1829 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1829 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1830 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze)) | 1830 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true)) |
1831 | return; | 1831 | return; |
1832 | if (flags == 0) | 1832 | if (flags == 0) |
1833 | { | 1833 | { |
@@ -1876,7 +1876,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1876 | 1876 | ||
1877 | // Check if you even have permission to do this | 1877 | // Check if you even have permission to do this |
1878 | ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1878 | ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1879 | if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze) && | 1879 | if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true) && |
1880 | !m_scene.Permissions.IsAdministrator(client.AgentId)) | 1880 | !m_scene.Permissions.IsAdministrator(client.AgentId)) |
1881 | return; | 1881 | return; |
1882 | 1882 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 07d00c0..2eafd44 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
286 | // ParcelFlags.ForSaleObjects | 286 | // ParcelFlags.ForSaleObjects |
287 | // ParcelFlags.LindenHome | 287 | // ParcelFlags.LindenHome |
288 | 288 | ||
289 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 289 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, false)) |
290 | { | 290 | { |
291 | allowedDelta |= (uint)(ParcelFlags.AllowLandmark | | 291 | allowedDelta |= (uint)(ParcelFlags.AllowLandmark | |
292 | ParcelFlags.AllowTerraform | | 292 | ParcelFlags.AllowTerraform | |
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
301 | ParcelFlags.AllowFly); | 301 | ParcelFlags.AllowFly); |
302 | } | 302 | } |
303 | 303 | ||
304 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale)) | 304 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale, true)) |
305 | { | 305 | { |
306 | if (args.AuthBuyerID != newData.AuthBuyerID || | 306 | if (args.AuthBuyerID != newData.AuthBuyerID || |
307 | args.SalePrice != newData.SalePrice) | 307 | args.SalePrice != newData.SalePrice) |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
324 | allowedDelta |= (uint)ParcelFlags.ForSale; | 324 | allowedDelta |= (uint)ParcelFlags.ForSale; |
325 | } | 325 | } |
326 | 326 | ||
327 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces)) | 327 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces, false)) |
328 | { | 328 | { |
329 | newData.Category = args.Category; | 329 | newData.Category = args.Category; |
330 | 330 | ||
@@ -333,21 +333,21 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
333 | ParcelFlags.MaturePublish) | (uint)(1 << 23); | 333 | ParcelFlags.MaturePublish) | (uint)(1 << 23); |
334 | } | 334 | } |
335 | 335 | ||
336 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity)) | 336 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity, false)) |
337 | { | 337 | { |
338 | newData.Description = args.Desc; | 338 | newData.Description = args.Desc; |
339 | newData.Name = args.Name; | 339 | newData.Name = args.Name; |
340 | newData.SnapshotID = args.SnapshotID; | 340 | newData.SnapshotID = args.SnapshotID; |
341 | } | 341 | } |
342 | 342 | ||
343 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint)) | 343 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint, false)) |
344 | { | 344 | { |
345 | newData.LandingType = args.LandingType; | 345 | newData.LandingType = args.LandingType; |
346 | newData.UserLocation = args.UserLocation; | 346 | newData.UserLocation = args.UserLocation; |
347 | newData.UserLookAt = args.UserLookAt; | 347 | newData.UserLookAt = args.UserLookAt; |
348 | } | 348 | } |
349 | 349 | ||
350 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia)) | 350 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia, false)) |
351 | { | 351 | { |
352 | newData.MediaAutoScale = args.MediaAutoScale; | 352 | newData.MediaAutoScale = args.MediaAutoScale; |
353 | newData.MediaID = args.MediaID; | 353 | newData.MediaID = args.MediaID; |
@@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
368 | ParcelFlags.UseEstateVoiceChan); | 368 | ParcelFlags.UseEstateVoiceChan); |
369 | } | 369 | } |
370 | 370 | ||
371 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses)) | 371 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses, false)) |
372 | { | 372 | { |
373 | newData.PassHours = args.PassHours; | 373 | newData.PassHours = args.PassHours; |
374 | newData.PassPrice = args.PassPrice; | 374 | newData.PassPrice = args.PassPrice; |
@@ -376,25 +376,27 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
376 | allowedDelta |= (uint)ParcelFlags.UsePassList; | 376 | allowedDelta |= (uint)ParcelFlags.UsePassList; |
377 | } | 377 | } |
378 | 378 | ||
379 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed)) | 379 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed, false)) |
380 | { | 380 | { |
381 | allowedDelta |= (uint)(ParcelFlags.UseAccessGroup | | 381 | allowedDelta |= (uint)(ParcelFlags.UseAccessGroup | |
382 | ParcelFlags.UseAccessList); | 382 | ParcelFlags.UseAccessList); |
383 | } | 383 | } |
384 | 384 | ||
385 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned)) | 385 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned, false)) |
386 | { | 386 | { |
387 | allowedDelta |= (uint)(ParcelFlags.UseBanList | | 387 | allowedDelta |= (uint)(ParcelFlags.UseBanList | |
388 | ParcelFlags.DenyAnonymous | | 388 | ParcelFlags.DenyAnonymous | |
389 | ParcelFlags.DenyAgeUnverified); | 389 | ParcelFlags.DenyAgeUnverified); |
390 | } | 390 | } |
391 | 391 | ||
392 | uint preserve = LandData.Flags & ~allowedDelta; | 392 | if (allowedDelta != (uint)ParcelFlags.None) |
393 | newData.Flags = preserve | (args.ParcelFlags & allowedDelta); | 393 | { |
394 | 394 | uint preserve = LandData.Flags & ~allowedDelta; | |
395 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 395 | newData.Flags = preserve | (args.ParcelFlags & allowedDelta); |
396 | 396 | ||
397 | SendLandUpdateToAvatarsOverMe(snap_selection); | 397 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
398 | SendLandUpdateToAvatarsOverMe(snap_selection); | ||
399 | } | ||
398 | } | 400 | } |
399 | 401 | ||
400 | public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) | 402 | public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) |
@@ -950,7 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
950 | 952 | ||
951 | public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) | 953 | public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) |
952 | { | 954 | { |
953 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 955 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true)) |
954 | { | 956 | { |
955 | List<uint> resultLocalIDs = new List<uint>(); | 957 | List<uint> resultLocalIDs = new List<uint>(); |
956 | try | 958 | try |
@@ -1000,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1000 | /// </param> | 1002 | /// </param> |
1001 | public void SendLandObjectOwners(IClientAPI remote_client) | 1003 | public void SendLandObjectOwners(IClientAPI remote_client) |
1002 | { | 1004 | { |
1003 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 1005 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true)) |
1004 | { | 1006 | { |
1005 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); | 1007 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); |
1006 | List<UUID> groups = new List<UUID>(); | 1008 | List<UUID> groups = new List<UUID>(); |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 79dd4a0..4f5b9b7 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -42,8 +42,8 @@ using PermissionMask = OpenSim.Framework.PermissionMask; | |||
42 | 42 | ||
43 | namespace OpenSim.Region.CoreModules.World.Permissions | 43 | namespace OpenSim.Region.CoreModules.World.Permissions |
44 | { | 44 | { |
45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PermissionsModule")] | 45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultPermissionsModule")] |
46 | public class PermissionsModule : INonSharedRegionModule, IPermissionsModule | 46 | public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
348 | 348 | ||
349 | public string Name | 349 | public string Name |
350 | { | 350 | { |
351 | get { return "PermissionsModule"; } | 351 | get { return "DefaultPermissionsModule"; } |
352 | } | 352 | } |
353 | 353 | ||
354 | public Type ReplaceableInterface | 354 | public Type ReplaceableInterface |
@@ -1047,7 +1047,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1047 | return GenericObjectPermission(editorID, objectID, false); | 1047 | return GenericObjectPermission(editorID, objectID, false); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene) | 1050 | private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager) |
1051 | { | 1051 | { |
1052 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1052 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1053 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1053 | if (m_bypassPermissions) return m_bypassPermissionsValue; |