Merge branch 'master' of /home/opensim/src/opensim
commit
d2c2a4301b
|
@ -94,7 +94,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// root agents when ACL denies access to root agent
|
// root agents when ACL denies access to root agent
|
||||||
public bool m_strictAccessControl = true;
|
public bool m_strictAccessControl = true;
|
||||||
public int MaxUndoCount = 5;
|
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 LoginsDisabled = true;
|
||||||
|
public bool StartDisabled = false;
|
||||||
public bool LoadingPrims;
|
public bool LoadingPrims;
|
||||||
public IXfer XferManager;
|
public IXfer XferManager;
|
||||||
|
|
||||||
|
@ -1373,10 +1376,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
IConfig startupConfig = m_config.Configs["Startup"];
|
IConfig startupConfig = m_config.Configs["Startup"];
|
||||||
if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
|
if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
|
||||||
{
|
{
|
||||||
|
if (m_sceneGraph.GetActiveScriptsCount() == 0)
|
||||||
|
{
|
||||||
|
LoginLock = false;
|
||||||
|
}
|
||||||
m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
|
m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
|
||||||
|
// For RegionReady lockouts
|
||||||
|
if( LoginLock == false)
|
||||||
|
{
|
||||||
LoginsDisabled = false;
|
LoginsDisabled = false;
|
||||||
|
}
|
||||||
m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
|
m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StartDisabled = true;
|
||||||
|
LoginsDisabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NotImplementedException)
|
catch (NotImplementedException)
|
||||||
|
|
|
@ -28,10 +28,13 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
@ -50,6 +53,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
private bool m_lastOarLoadedOk;
|
private bool m_lastOarLoadedOk;
|
||||||
private int m_channelNotify = -1000;
|
private int m_channelNotify = -1000;
|
||||||
private bool m_enabled = false;
|
private bool m_enabled = false;
|
||||||
|
private bool m_disable_logins = false;
|
||||||
|
|
||||||
Scene m_scene = null;
|
Scene m_scene = null;
|
||||||
|
|
||||||
|
@ -68,9 +72,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
if (m_config != null)
|
if (m_config != null)
|
||||||
{
|
{
|
||||||
m_enabled = m_config.GetBoolean("enabled", false);
|
m_enabled = m_config.GetBoolean("enabled", false);
|
||||||
|
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
|
m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
|
||||||
|
m_disable_logins = m_config.GetBoolean("login_disable", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +99,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
|
m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
|
||||||
|
|
||||||
m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);
|
m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
|
if(m_disable_logins == true)
|
||||||
|
{
|
||||||
|
scene.LoginLock = true;
|
||||||
|
scene.LoginsDisabled = true;
|
||||||
|
m_log.InfoFormat("[RegionReady]: Logins disabled for {0}",m_scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
|
@ -148,6 +161,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
c.SenderUUID = UUID.Zero;
|
c.SenderUUID = UUID.Zero;
|
||||||
c.Scene = m_scene;
|
c.Scene = m_scene;
|
||||||
|
|
||||||
|
if(m_disable_logins == true)
|
||||||
|
{
|
||||||
|
if(m_scene.StartDisabled == false)
|
||||||
|
{
|
||||||
|
m_scene.LoginsDisabled = false;
|
||||||
|
m_scene.LoginLock = false;
|
||||||
|
m_log.InfoFormat("[RegionReady]: Logins enabled for {0}", m_scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}",
|
m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}",
|
||||||
m_scene.RegionInfo.RegionName, c.Message, m_channelNotify);
|
m_scene.RegionInfo.RegionName, c.Message, m_channelNotify);
|
||||||
m_scene.EventManager.TriggerOnChatBroadcast(this, c);
|
m_scene.EventManager.TriggerOnChatBroadcast(this, c);
|
||||||
|
|
|
@ -1174,6 +1174,7 @@
|
||||||
; - the third field is a number indicating how many scripts failed to compile
|
; - the third field is a number indicating how many scripts failed to compile
|
||||||
; - "oar error" if supplied, provides the error message from the OAR load
|
; - "oar error" if supplied, provides the error message from the OAR load
|
||||||
channel_notify = -800
|
channel_notify = -800
|
||||||
|
login_disable = false
|
||||||
|
|
||||||
|
|
||||||
[MRM]
|
[MRM]
|
||||||
|
|
Loading…
Reference in New Issue