From 99f42c0a6ec064d7b625c9b33e185a5e153d6be8 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 27 May 2011 19:05:16 -0400 Subject: Add option to disable logins This just covers script loading for now. More to come. --- OpenSim/Region/Framework/Scenes/Scene.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4aae13c..e9f5f9e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -94,7 +94,10 @@ namespace OpenSim.Region.Framework.Scenes // root agents when ACL denies access to root agent public bool m_strictAccessControl = true; public int MaxUndoCount = 5; + // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; + public bool LoginLock = false; public bool LoginsDisabled = true; + public bool StartDisabled = false; public bool LoadingPrims; public IXfer XferManager; @@ -1373,10 +1376,23 @@ namespace OpenSim.Region.Framework.Scenes IConfig startupConfig = m_config.Configs["Startup"]; if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false)) { + if (m_sceneGraph.GetActiveScriptsCount() == 0) + { + LoginLock = false; + } m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); - LoginsDisabled = false; + // For RegionReady lockouts + if( LoginLock == false) + { + LoginsDisabled = false; + } m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface(), RegionInfo); } + else + { + StartDisabled = true; + LoginsDisabled = true; + } } } catch (NotImplementedException) -- cgit v1.1