aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs25
1 files changed, 24 insertions, 1 deletions
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);