diff options
author | Melanie | 2010-09-30 20:01:55 +0200 |
---|---|---|
committer | Melanie | 2010-09-30 20:01:55 +0200 |
commit | 7ad1b60ecaa64ae693be48df9a32cb93bb22e76f (patch) | |
tree | 58e1281481d479401c922cea32fb2878b17336bc | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-7ad1b60ecaa64ae693be48df9a32cb93bb22e76f.zip opensim-SC-7ad1b60ecaa64ae693be48df9a32cb93bb22e76f.tar.gz opensim-SC-7ad1b60ecaa64ae693be48df9a32cb93bb22e76f.tar.bz2 opensim-SC-7ad1b60ecaa64ae693be48df9a32cb93bb22e76f.tar.xz |
Enforce region agent limit as set in estate tools
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 240d33c..e835281 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3856,6 +3856,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3856 | 3856 | ||
3857 | // We have to wait until the viewer contacts this region after receiving EAC. | 3857 | // We have to wait until the viewer contacts this region after receiving EAC. |
3858 | // That calls AddNewClient, which finally creates the ScenePresence | 3858 | // That calls AddNewClient, which finally creates the ScenePresence |
3859 | int num = m_sceneGraph.GetNumberOfScenePresences(); | ||
3860 | |||
3861 | if (num >= RegionInfo.RegionSettings.AgentLimit) | ||
3862 | { | ||
3863 | if (!Permissions.IsAdministrator(cAgentData.AgentID)) | ||
3864 | return false; | ||
3865 | } | ||
3866 | |||
3859 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3867 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
3860 | if (childAgentUpdate != null) | 3868 | if (childAgentUpdate != null) |
3861 | { | 3869 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index b61aed5..1163ebf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -826,6 +826,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
826 | return m_scenePresenceArray; | 826 | return m_scenePresenceArray; |
827 | } | 827 | } |
828 | 828 | ||
829 | public int GetNumberOfScenePresences() | ||
830 | { | ||
831 | return m_scenePresenceArray.Count; | ||
832 | } | ||
833 | |||
829 | /// <summary> | 834 | /// <summary> |
830 | /// Request a scene presence by UUID. Fast, indexed lookup. | 835 | /// Request a scene presence by UUID. Fast, indexed lookup. |
831 | /// </summary> | 836 | /// </summary> |