From 6dda7c65ae1d58cac3e8dc2d9d64f56c870df39e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 19 Jul 2012 00:09:22 +0100 Subject: Add EventManager.OnRegionLoginsStatusChange fired whenever logins are enabled or disabled at any point, not just during initial startup. This replaces EventManager.OnLoginsEnabled which only fired when logins were first enabled and was affected by a bug where it would never fire if the region started with logins disabled. --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (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 d4ccd41..6d8ee7b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -128,9 +128,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; @@ -1478,7 +1479,7 @@ namespace OpenSim.Region.Framework.Scenes // landMS = Util.EnvironmentTickCountSubtract(ldMS); //} - if (LoginsDisabled && Frame == 20) + if (!LoginsEnabled && Frame == 20) { // m_log.DebugFormat("{0} {1} {2}", LoginsDisabled, m_sceneGraph.GetActiveScriptsCount(), LoginLock); @@ -1492,8 +1493,7 @@ namespace OpenSim.Region.Framework.Scenes if (!StartDisabled) { m_log.InfoFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); - LoginsDisabled = false; - EventManager.TriggerLoginsEnabled(this); + LoginsEnabled = true; } m_sceneGridService.InformNeighborsThatRegionisUp( @@ -3460,7 +3460,7 @@ namespace OpenSim.Region.Framework.Scenes agent.startpos ); - if (LoginsDisabled) + if (!LoginsEnabled) { reason = "Logins Disabled"; return false; -- cgit v1.1