Merge branch 'master' of /home/opensim/var/repo/opensim
commit
cbe49ed917
|
@ -3665,6 +3665,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return false;
|
||||
}
|
||||
|
||||
int num = m_sceneGraph.GetNumberOfScenePresences();
|
||||
|
||||
if (num >= RegionInfo.RegionSettings.AgentLimit)
|
||||
{
|
||||
if (!Permissions.IsAdministrator(cAgentData.AgentID))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
|
||||
|
||||
if (childAgentUpdate != null)
|
||||
|
@ -4966,6 +4975,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// child agent creation, thereby emulating the SL behavior.
|
||||
public bool QueryAccess(UUID agentID, Vector3 position, out string reason)
|
||||
{
|
||||
int num = m_sceneGraph.GetNumberOfScenePresences();
|
||||
|
||||
if (num >= RegionInfo.RegionSettings.AgentLimit)
|
||||
{
|
||||
if (!Permissions.IsAdministrator(agentID))
|
||||
{
|
||||
reason = "The region is full";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
reason = String.Empty;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -800,6 +800,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return m_scenePresenceArray;
|
||||
}
|
||||
|
||||
public int GetNumberOfScenePresences()
|
||||
{
|
||||
return m_scenePresenceArray.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request a scene presence by UUID. Fast, indexed lookup.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue