diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 19 |
2 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 9779c68..2554995 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1624,7 +1624,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1624 | ScenePresence SP; | 1624 | ScenePresence SP; |
1625 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out SP); | 1625 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out SP); |
1626 | List<SceneObjectGroup> returns = new List<SceneObjectGroup>(); | 1626 | List<SceneObjectGroup> returns = new List<SceneObjectGroup>(); |
1627 | if (SP.GodLevel != 0) | 1627 | if (SP.UserLevel != 0) |
1628 | { | 1628 | { |
1629 | if (flags == 0) //All parcels, scripted or not | 1629 | if (flags == 0) //All parcels, scripted or not |
1630 | { | 1630 | { |
@@ -1692,7 +1692,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1692 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager); | 1692 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager); |
1693 | System.Threading.Timer Timer; | 1693 | System.Threading.Timer Timer; |
1694 | 1694 | ||
1695 | if (targetAvatar.GodLevel == 0) | 1695 | if (targetAvatar.UserLevel == 0) |
1696 | { | 1696 | { |
1697 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1697 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1698 | if (!((Scene)client.Scene).Permissions.CanEditParcel(client.AgentId, land)) | 1698 | if (!((Scene)client.Scene).Permissions.CanEditParcel(client.AgentId, land)) |
@@ -1737,7 +1737,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1737 | //Just eject | 1737 | //Just eject |
1738 | if (flags == 0) | 1738 | if (flags == 0) |
1739 | { | 1739 | { |
1740 | if (targetAvatar.GodLevel == 0) | 1740 | if (targetAvatar.UserLevel == 0) |
1741 | { | 1741 | { |
1742 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1742 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1743 | if (!((Scene)client.Scene).Permissions.CanEditParcel(client.AgentId, land)) | 1743 | if (!((Scene)client.Scene).Permissions.CanEditParcel(client.AgentId, land)) |
@@ -1816,7 +1816,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1816 | //Eject and ban | 1816 | //Eject and ban |
1817 | if (flags == 1) | 1817 | if (flags == 1) |
1818 | { | 1818 | { |
1819 | if (targetAvatar.GodLevel == 0) | 1819 | if (targetAvatar.UserLevel == 0) |
1820 | { | 1820 | { |
1821 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1821 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1822 | if (!((Scene)client.Scene).Permissions.CanEditParcel(client.AgentId, land)) | 1822 | if (!((Scene)client.Scene).Permissions.CanEditParcel(client.AgentId, land)) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index d67638a..ab0eed8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -68,6 +68,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
68 | public delegate bool IsGodHandler(UUID user, Scene requestFromScene); | 68 | public delegate bool IsGodHandler(UUID user, Scene requestFromScene); |
69 | public delegate bool IsAdministratorHandler(UUID user); | 69 | public delegate bool IsAdministratorHandler(UUID user); |
70 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); | 70 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); |
71 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene); | ||
71 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); | 72 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); |
72 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); | 73 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); |
73 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); | 74 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); |
@@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
131 | public event IsGodHandler OnIsGod; | 132 | public event IsGodHandler OnIsGod; |
132 | public event IsAdministratorHandler OnIsAdministrator; | 133 | public event IsAdministratorHandler OnIsAdministrator; |
133 | public event EditParcelHandler OnEditParcel; | 134 | public event EditParcelHandler OnEditParcel; |
135 | public event EditParcelPropertiesHandler OnEditParcelProperties; | ||
134 | public event SellParcelHandler OnSellParcel; | 136 | public event SellParcelHandler OnSellParcel; |
135 | public event AbandonParcelHandler OnAbandonParcel; | 137 | public event AbandonParcelHandler OnAbandonParcel; |
136 | public event ReclaimParcelHandler OnReclaimParcel; | 138 | public event ReclaimParcelHandler OnReclaimParcel; |
@@ -734,6 +736,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
734 | } | 736 | } |
735 | return true; | 737 | return true; |
736 | } | 738 | } |
739 | |||
740 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p) | ||
741 | { | ||
742 | EditParcelPropertiesHandler handler = OnEditParcelProperties; | ||
743 | if (handler != null) | ||
744 | { | ||
745 | Delegate[] list = handler.GetInvocationList(); | ||
746 | foreach (EditParcelPropertiesHandler h in list) | ||
747 | { | ||
748 | if (h(user, parcel, p, m_scene) == false) | ||
749 | return false; | ||
750 | } | ||
751 | } | ||
752 | return true; | ||
753 | } | ||
737 | #endregion | 754 | #endregion |
738 | 755 | ||
739 | #region SELL PARCEL | 756 | #region SELL PARCEL |
@@ -1043,4 +1060,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
1043 | return true; | 1060 | return true; |
1044 | } | 1061 | } |
1045 | } | 1062 | } |
1046 | } \ No newline at end of file | 1063 | } |