mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Mantis#1597. Thank you, Melanie for a patch that:
Adds handlers for the reclaim land functionality, plus all needed permissions checks.
This commit is contained in:
@@ -899,6 +899,31 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
#endregion
|
||||
|
||||
public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene);
|
||||
private List<CanReclaimParcel> CanReclaimParcelCheckFunctions = new List<CanReclaimParcel>();
|
||||
|
||||
public void addCheckReclaimParcel(CanReclaimParcel delegateFunc)
|
||||
{
|
||||
if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc))
|
||||
CanReclaimParcelCheckFunctions.Add(delegateFunc);
|
||||
}
|
||||
public void removeCheckReclaimParcel(CanReclaimParcel delegateFunc)
|
||||
{
|
||||
if (CanReclaimParcelCheckFunctions.Contains(delegateFunc))
|
||||
CanReclaimParcelCheckFunctions.Remove(delegateFunc);
|
||||
}
|
||||
|
||||
public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel)
|
||||
{
|
||||
foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions)
|
||||
{
|
||||
if (check(user, parcel, m_scene) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene);
|
||||
private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user