Enforce region agent limit as set in estate tools
parent
521e2c8355
commit
7ad1b60eca
|
@ -3856,6 +3856,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
// We have to wait until the viewer contacts this region after receiving EAC.
|
||||
// That calls AddNewClient, which finally creates the ScenePresence
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -826,6 +826,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