diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 20 |
1 files changed, 20 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 | } |