aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs5
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index fdd5205..01de824 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3665,6 +3665,15 @@ namespace OpenSim.Region.Framework.Scenes
3665 return false; 3665 return false;
3666 } 3666 }
3667 3667
3668 int num = m_sceneGraph.GetNumberOfScenePresences();
3669
3670 if (num >= RegionInfo.RegionSettings.AgentLimit)
3671 {
3672 if (!Permissions.IsAdministrator(cAgentData.AgentID))
3673 return false;
3674 }
3675
3676
3668 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); 3677 ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
3669 3678
3670 if (childAgentUpdate != null) 3679 if (childAgentUpdate != null)
@@ -4966,6 +4975,17 @@ namespace OpenSim.Region.Framework.Scenes
4966 // child agent creation, thereby emulating the SL behavior. 4975 // child agent creation, thereby emulating the SL behavior.
4967 public bool QueryAccess(UUID agentID, Vector3 position, out string reason) 4976 public bool QueryAccess(UUID agentID, Vector3 position, out string reason)
4968 { 4977 {
4978 int num = m_sceneGraph.GetNumberOfScenePresences();
4979
4980 if (num >= RegionInfo.RegionSettings.AgentLimit)
4981 {
4982 if (!Permissions.IsAdministrator(agentID))
4983 {
4984 reason = "The region is full";
4985 return false;
4986 }
4987 }
4988
4969 reason = String.Empty; 4989 reason = String.Empty;
4970 return true; 4990 return true;
4971 } 4991 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 72f0402..fc31b65 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -800,6 +800,11 @@ namespace OpenSim.Region.Framework.Scenes
800 return m_scenePresenceArray; 800 return m_scenePresenceArray;
801 } 801 }
802 802
803 public int GetNumberOfScenePresences()
804 {
805 return m_scenePresenceArray.Count;
806 }
807
803 /// <summary> 808 /// <summary>
804 /// Request a scene presence by UUID. Fast, indexed lookup. 809 /// Request a scene presence by UUID. Fast, indexed lookup.
805 /// </summary> 810 /// </summary>