mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
if a NPC is owned, allow access if ownerID matchs parcel owner or it is in the access list. option OS_NPC_OBJECT_GROUP it still needed if access is by group (this option should also work with not owned NPC) NEEDS TESTING, may prove to be a bad solution
This commit is contained in:
@@ -694,7 +694,30 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
if (HasGroupAccess(avatar))
|
||||
return false;
|
||||
|
||||
return !IsInLandAccessList(avatar);
|
||||
if(IsInLandAccessList(avatar))
|
||||
return false;
|
||||
|
||||
// check for a NPC
|
||||
ScenePresence sp;
|
||||
if (!m_scene.TryGetScenePresence(avatar, out sp))
|
||||
return true;
|
||||
|
||||
if(sp==null || !sp.isNPC)
|
||||
return true;
|
||||
|
||||
INPC npccli = (INPC)sp.ControllingClient;
|
||||
if(npccli== null)
|
||||
return true;
|
||||
|
||||
UUID owner = npccli.Owner;
|
||||
|
||||
if(owner == UUID.Zero)
|
||||
return true;
|
||||
|
||||
if (owner == LandData.OwnerID)
|
||||
return false;
|
||||
|
||||
return !IsInLandAccessList(owner);
|
||||
}
|
||||
|
||||
public bool IsInLandAccessList(UUID avatar)
|
||||
|
||||
Reference in New Issue
Block a user