aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorBlueWall2011-05-28 00:39:21 -0400
committerBlueWall2011-05-28 00:39:21 -0400
commitd2c2a4301b5c2d12e05483a1af0ea5959b7be5ca (patch)
tree0defa28e701d9ffaa0c4352c751d5273180d0742 /OpenSim
parentminor: remove mono compiler warning (diff)
parentAdd option to disable logins (diff)
downloadopensim-SC_OLD-d2c2a4301b5c2d12e05483a1af0ea5959b7be5ca.zip
opensim-SC_OLD-d2c2a4301b5c2d12e05483a1af0ea5959b7be5ca.tar.gz
opensim-SC_OLD-d2c2a4301b5c2d12e05483a1af0ea5959b7be5ca.tar.bz2
opensim-SC_OLD-d2c2a4301b5c2d12e05483a1af0ea5959b7be5ca.tar.xz
Merge branch 'master' of /home/opensim/src/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs18
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs25
2 files changed, 41 insertions, 2 deletions
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
94 // root agents when ACL denies access to root agent 94 // root agents when ACL denies access to root agent
95 public bool m_strictAccessControl = true; 95 public bool m_strictAccessControl = true;
96 public int MaxUndoCount = 5; 96 public int MaxUndoCount = 5;
97 // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet;
98 public bool LoginLock = false;
97 public bool LoginsDisabled = true; 99 public bool LoginsDisabled = true;
100 public bool StartDisabled = false;
98 public bool LoadingPrims; 101 public bool LoadingPrims;
99 public IXfer XferManager; 102 public IXfer XferManager;
100 103
@@ -1373,10 +1376,23 @@ namespace OpenSim.Region.Framework.Scenes
1373 IConfig startupConfig = m_config.Configs["Startup"]; 1376 IConfig startupConfig = m_config.Configs["Startup"];
1374 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false)) 1377 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
1375 { 1378 {
1379 if (m_sceneGraph.GetActiveScriptsCount() == 0)
1380 {
1381 LoginLock = false;
1382 }
1376 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); 1383 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1377 LoginsDisabled = false; 1384 // For RegionReady lockouts
1385 if( LoginLock == false)
1386 {
1387 LoginsDisabled = false;
1388 }
1378 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); 1389 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
1379 } 1390 }
1391 else
1392 {
1393 StartDisabled = true;
1394 LoginsDisabled = true;
1395 }
1380 } 1396 }
1381 } 1397 }
1382 catch (NotImplementedException) 1398 catch (NotImplementedException)
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index 122ad40..c59c88c 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -28,10 +28,13 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Net;
32using System.IO;
31 33
32using log4net; 34using log4net;
33using Nini.Config; 35using Nini.Config;
34using OpenMetaverse; 36using OpenMetaverse;
37using OpenMetaverse.StructuredData;
35 38
36using OpenSim.Framework; 39using OpenSim.Framework;
37using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
@@ -50,6 +53,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
50 private bool m_lastOarLoadedOk; 53 private bool m_lastOarLoadedOk;
51 private int m_channelNotify = -1000; 54 private int m_channelNotify = -1000;
52 private bool m_enabled = false; 55 private bool m_enabled = false;
56 private bool m_disable_logins = false;
53 57
54 Scene m_scene = null; 58 Scene m_scene = null;
55 59
@@ -68,10 +72,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
68 if (m_config != null) 72 if (m_config != null)
69 { 73 {
70 m_enabled = m_config.GetBoolean("enabled", false); 74 m_enabled = m_config.GetBoolean("enabled", false);
75
71 if (m_enabled) 76 if (m_enabled)
72 { 77 {
73 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify); 78 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
74 } 79 m_disable_logins = m_config.GetBoolean("login_disable", false);
80 }
75 } 81 }
76 82
77// if (!m_enabled) 83// if (!m_enabled)
@@ -93,6 +99,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
93 m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded; 99 m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
94 100
95 m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName); 101 m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);
102
103 if(m_disable_logins == true)
104 {
105 scene.LoginLock = true;
106 scene.LoginsDisabled = true;
107 m_log.InfoFormat("[RegionReady]: Logins disabled for {0}",m_scene.RegionInfo.RegionName);
108 }
96 } 109 }
97 110
98 public void RemoveRegion(Scene scene) 111 public void RemoveRegion(Scene scene)
@@ -148,6 +161,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
148 c.SenderUUID = UUID.Zero; 161 c.SenderUUID = UUID.Zero;
149 c.Scene = m_scene; 162 c.Scene = m_scene;
150 163
164 if(m_disable_logins == true)
165 {
166 if(m_scene.StartDisabled == false)
167 {
168 m_scene.LoginsDisabled = false;
169 m_scene.LoginLock = false;
170 m_log.InfoFormat("[RegionReady]: Logins enabled for {0}", m_scene.RegionInfo.RegionName);
171 }
172 }
173
151 m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}", 174 m_log.InfoFormat("[RegionReady]: Region \"{0}\" is ready: \"{1}\" on channel {2}",
152 m_scene.RegionInfo.RegionName, c.Message, m_channelNotify); 175 m_scene.RegionInfo.RegionName, c.Message, m_channelNotify);
153 m_scene.EventManager.TriggerOnChatBroadcast(this, c); 176 m_scene.EventManager.TriggerOnChatBroadcast(this, c);