aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/OptionalModules/Scripting/RegionReadyModule
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs38
1 files changed, 21 insertions, 17 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index 870c0bb..a1dd711 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")]
47 public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule 47 public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule
48 { 48 {
49 private static readonly ILog m_log = 49 private static readonly ILog m_log =
50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private IConfig m_config = null; 52 private IConfig m_config = null;
@@ -57,24 +57,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
57 private bool m_enabled = false; 57 private bool m_enabled = false;
58 private bool m_disable_logins; 58 private bool m_disable_logins;
59 private string m_uri = string.Empty; 59 private string m_uri = string.Empty;
60 60
61 Scene m_scene; 61 Scene m_scene;
62 62
63 #region INonSharedRegionModule interface 63 #region INonSharedRegionModule interface
64 64
65 public Type ReplaceableInterface 65 public Type ReplaceableInterface
66 { 66 {
67 get { return null; } 67 get { return null; }
68 } 68 }
69 69
70 public void Initialise(IConfigSource config) 70 public void Initialise(IConfigSource config)
71 { 71 {
72 m_config = config.Configs["RegionReady"]; 72 m_config = config.Configs["RegionReady"];
73 if (m_config != null) 73 if (m_config != null)
74 { 74 {
75 m_enabled = m_config.GetBoolean("enabled", false); 75 m_enabled = m_config.GetBoolean("enabled", false);
76 76
77 if (m_enabled) 77 if (m_enabled)
78 { 78 {
79 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify); 79 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
80 m_disable_logins = m_config.GetBoolean("login_disable", false); 80 m_disable_logins = m_config.GetBoolean("login_disable", false);
@@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; 106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
107 107
108 // This should always show up to the user but should not trigger warn/errors as these messages are 108 // This should always show up to the user but should not trigger warn/errors as these messages are
109 // expected and are not simulator problems. Ideally, there would be a status level in log4net but 109 // expected and are not simulator problems. Ideally, there would be a status level in log4net but
110 // failing that, we will print out to console instead. 110 // failing that, we will print out to console instead.
111 MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); 111 MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
112 112
@@ -152,12 +152,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
152 { 152 {
153 m_log.DebugFormat("[RegionReady]: Script compile queue empty!"); 153 m_log.DebugFormat("[RegionReady]: Script compile queue empty!");
154 154
155 if (m_firstEmptyCompileQueue || m_oarFileLoading) 155 if (m_firstEmptyCompileQueue || m_oarFileLoading)
156 { 156 {
157 OSChatMessage c = new OSChatMessage(); 157 OSChatMessage c = new OSChatMessage();
158 if (m_firstEmptyCompileQueue) 158 if (m_firstEmptyCompileQueue)
159 c.Message = "server_startup,"; 159 c.Message = "server_startup,";
160 else 160 else
161 c.Message = "oar_file_load,"; 161 c.Message = "oar_file_load,";
162 m_firstEmptyCompileQueue = false; 162 m_firstEmptyCompileQueue = false;
163 m_oarFileLoading = false; 163 m_oarFileLoading = false;
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
165 m_scene.Backup(false); 165 m_scene.Backup(false);
166 166
167 c.From = "RegionReady"; 167 c.From = "RegionReady";
168 if (m_lastOarLoadedOk) 168 if (m_lastOarLoadedOk)
169 c.Message += "1,"; 169 c.Message += "1,";
170 else 170 else
171 c.Message += "0,"; 171 c.Message += "0,";
@@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
193 { 193 {
194 m_oarFileLoading = true; 194 m_oarFileLoading = true;
195 195
196 if (message==String.Empty) 196 if (message==String.Empty)
197 { 197 {
198 m_lastOarLoadedOk = true; 198 m_lastOarLoadedOk = true;
199 } 199 }
@@ -214,6 +214,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
214 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; 214 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
215 m_scene.LoginLock = false; 215 m_scene.LoginLock = false;
216 216
217 GC.Collect();
218 GC.WaitForPendingFinalizers();
219 GC.Collect();
220
217 if (!m_scene.StartDisabled) 221 if (!m_scene.StartDisabled)
218 { 222 {
219 m_scene.LoginsEnabled = true; 223 m_scene.LoginsEnabled = true;
@@ -222,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
222 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); 226 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString());
223 227
224 // Putting this out to console to make it eye-catching for people who are running OpenSimulator 228 // Putting this out to console to make it eye-catching for people who are running OpenSimulator
225 // without info log messages enabled. Making this a warning is arguably misleading since it isn't a 229 // without info log messages enabled. Making this a warning is arguably misleading since it isn't a
226 // warning, and monitor scripts looking for warn/error/fatal messages will received false positives. 230 // warning, and monitor scripts looking for warn/error/fatal messages will received false positives.
227 // Arguably, log4net needs a status log level (like Apache). 231 // Arguably, log4net needs a status log level (like Apache).
228 MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name); 232 MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
@@ -252,7 +256,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
252// m_scene.EventManager.OnRezScript += OnRezScript; 256// m_scene.EventManager.OnRezScript += OnRezScript;
253// m_oarFileLoading = true; 257// m_oarFileLoading = true;
254// m_firstEmptyCompileQueue = true; 258// m_firstEmptyCompileQueue = true;
255// 259//
256// m_scene.LoginsDisabled = true; 260// m_scene.LoginsDisabled = true;
257// m_scene.LoginLock = true; 261// m_scene.LoginLock = true;
258// if ( m_uri != string.Empty ) 262// if ( m_uri != string.Empty )