mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
add bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject land) permissions check
This commit is contained in:
@@ -83,6 +83,7 @@ namespace OpenSim.Region.OptionalModules
|
||||
m_scene = scene;
|
||||
scene.Permissions.OnRezObject += CanRezObject;
|
||||
scene.Permissions.OnObjectEntry += CanObjectEnter;
|
||||
scene.Permissions.OnObjectEnterWithScripts += CanObjectEnterWithScripts;
|
||||
scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||
|
||||
m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName);
|
||||
@@ -95,6 +96,7 @@ namespace OpenSim.Region.OptionalModules
|
||||
|
||||
m_scene.Permissions.OnRezObject -= CanRezObject;
|
||||
m_scene.Permissions.OnObjectEntry -= CanObjectEnter;
|
||||
scene.Permissions.OnObjectEnterWithScripts -= CanObjectEnterWithScripts;
|
||||
m_scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
|
||||
}
|
||||
|
||||
@@ -173,6 +175,26 @@ namespace OpenSim.Region.OptionalModules
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject newParcel)
|
||||
{
|
||||
if (sog == null)
|
||||
return false;
|
||||
|
||||
if (newParcel == null)
|
||||
return true;
|
||||
|
||||
int objectCount = sog.PrimCount;
|
||||
|
||||
// TODO: Add Special Case here for temporary prims
|
||||
|
||||
string response = DoCommonChecks(objectCount, sog.OwnerID, newParcel);
|
||||
|
||||
if (response != null)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private string DoCommonChecks(int objectCount, UUID ownerID, ILandObject lo)
|
||||
{
|
||||
string response = null;
|
||||
|
||||
Reference in New Issue
Block a user