mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
Enforce region agent limit as set in estate tools
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user