diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index fdd5205..696c6ee 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2316,7 +2316,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2316 | /// <returns></returns> | 2316 | /// <returns></returns> |
2317 | public bool IncomingCreateObject(ISceneObject sog) | 2317 | public bool IncomingCreateObject(ISceneObject sog) |
2318 | { | 2318 | { |
2319 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2319 | //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, |
2320 | // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); | ||
2321 | |||
2320 | SceneObjectGroup newObject; | 2322 | SceneObjectGroup newObject; |
2321 | try | 2323 | try |
2322 | { | 2324 | { |
@@ -3665,6 +3667,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
3665 | return false; | 3667 | return false; |
3666 | } | 3668 | } |
3667 | 3669 | ||
3670 | int num = m_sceneGraph.GetNumberOfScenePresences(); | ||
3671 | |||
3672 | if (num >= RegionInfo.RegionSettings.AgentLimit) | ||
3673 | { | ||
3674 | if (!Permissions.IsAdministrator(cAgentData.AgentID)) | ||
3675 | return false; | ||
3676 | } | ||
3677 | |||
3678 | |||
3668 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3679 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
3669 | 3680 | ||
3670 | if (childAgentUpdate != null) | 3681 | if (childAgentUpdate != null) |
@@ -4966,6 +4977,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
4966 | // child agent creation, thereby emulating the SL behavior. | 4977 | // child agent creation, thereby emulating the SL behavior. |
4967 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) | 4978 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) |
4968 | { | 4979 | { |
4980 | int num = m_sceneGraph.GetNumberOfScenePresences(); | ||
4981 | |||
4982 | if (num >= RegionInfo.RegionSettings.AgentLimit) | ||
4983 | { | ||
4984 | if (!Permissions.IsAdministrator(agentID)) | ||
4985 | { | ||
4986 | reason = "The region is full"; | ||
4987 | return false; | ||
4988 | } | ||
4989 | } | ||
4990 | |||
4969 | reason = String.Empty; | 4991 | reason = String.Empty; |
4970 | return true; | 4992 | return true; |
4971 | } | 4993 | } |