aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-18 23:35:05 +0100
committerJustin Clark-Casey (justincc)2012-07-18 23:35:05 +0100
commit528004d34988d8d2349f18ff7d78c6dd50ab8b2d (patch)
treecc5d484e9a803415441fce5868b2ba965d9ff737 /OpenSim/Region/OptionalModules/Scripting
parentStop the 15 second initial script compile wait if a script is being rezzed on... (diff)
downloadopensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.zip
opensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.gz
opensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.bz2
opensim-SC_OLD-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.xz
Perform other region ready actions even if simulator is configured to leave logins disabled on startup.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs45
1 files changed, 19 insertions, 26 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index 6b09c3b..8d5b25f 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -31,16 +31,14 @@ using System.Reflection;
31using System.Net; 31using System.Net;
32using System.IO; 32using System.IO;
33using System.Text; 33using System.Text;
34
35using log4net; 34using log4net;
36using Nini.Config; 35using Nini.Config;
37using OpenMetaverse; 36using OpenMetaverse;
38using OpenMetaverse.StructuredData; 37using OpenMetaverse.StructuredData;
39using OpenSim.Services.Interfaces;
40
41using OpenSim.Framework; 38using OpenSim.Framework;
42using OpenSim.Region.Framework.Interfaces; 39using OpenSim.Region.Framework.Interfaces;
43using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
41using OpenSim.Services.Interfaces;
44 42
45namespace OpenSim.Region.OptionalModules.Scripting.RegionReady 43namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
46{ 44{
@@ -105,7 +103,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
105 if (m_disable_logins) 103 if (m_disable_logins)
106 { 104 {
107 m_scene.LoginLock = true; 105 m_scene.LoginLock = true;
108 m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
109 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; 106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
110 107
111 m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); 108 m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
@@ -125,15 +122,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
125 m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded; 122 m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
126 123
127 if (m_disable_logins) 124 if (m_disable_logins)
128 {
129 m_scene.EventManager.OnLoginsEnabled -= OnLoginsEnabled;
130 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; 125 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
131 }
132 126
133 if (m_uri != string.Empty) 127 if (m_uri != string.Empty)
134 {
135 RRAlert("shutdown"); 128 RRAlert("shutdown");
136 }
137 129
138 m_scene = null; 130 m_scene = null;
139 } 131 }
@@ -186,8 +178,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
186 m_scene.RegionInfo.RegionName, c.Message, m_channelNotify); 178 m_scene.RegionInfo.RegionName, c.Message, m_channelNotify);
187 179
188 m_scene.EventManager.TriggerOnChatBroadcast(this, c); 180 m_scene.EventManager.TriggerOnChatBroadcast(this, c);
189 m_scene.EventManager.TriggerLoginsEnabled(m_scene); 181
190 m_scene.SceneGridService.InformNeighborsThatRegionisUp(m_scene.RequestModuleInterface<INeighbourService>(), m_scene.RegionInfo); 182 TriggerRegionReady(m_scene);
191 } 183 }
192 } 184 }
193 185
@@ -207,20 +199,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
207 } 199 }
208 200
209 /// <summary> 201 /// <summary>
210 /// This will be triggered by Scene directly if it contains no scripts on startup. 202 /// This will be triggered by Scene directly if it contains no scripts on startup. Otherwise it is triggered
203 /// when the script compile queue is empty after initial region startup.
211 /// </summary> 204 /// </summary>
212 /// <remarks>
213 /// m_ScriptsRezzing will be false if there were none
214 /// else it will be true and we should wait on the
215 /// empty compile queue
216 /// </remarks>
217 /// <param name='scene'></param> 205 /// <param name='scene'></param>
218 void OnLoginsEnabled(IScene scene) 206 public void TriggerRegionReady(IScene scene)
219 { 207 {
220 if (m_scene.StartDisabled == false) 208 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
209 m_scene.LoginLock = false;
210
211 if (!m_scene.StartDisabled)
221 { 212 {
222 m_scene.LoginsDisabled = false; 213 m_scene.LoginsDisabled = false;
223 m_scene.LoginLock = false;
224 214
225 // m_log.InfoFormat("[RegionReady]: Logins enabled for {0}, Oar {1}", 215 // m_log.InfoFormat("[RegionReady]: Logins enabled for {0}, Oar {1}",
226 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); 216 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString());
@@ -228,15 +218,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
228 m_log.InfoFormat( 218 m_log.InfoFormat(
229 "[RegionReady]: INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name); 219 "[RegionReady]: INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
230 220
231 if (m_uri != string.Empty) 221 m_scene.EventManager.TriggerLoginsEnabled(m_scene);
232 { 222 }
233 RRAlert("enabled"); 223
234 } 224 m_scene.SceneGridService.InformNeighborsThatRegionisUp(
225 m_scene.RequestModuleInterface<INeighbourService>(), m_scene.RegionInfo);
235 226
236 m_scene.EventManager.TriggerRegionReady(m_scene); 227 if (m_uri != string.Empty)
228 {
229 RRAlert("enabled");
237 } 230 }
238 231
239 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue; 232 m_scene.EventManager.TriggerRegionReady(m_scene);
240 } 233 }
241 234
242 public void OarLoadingAlert(string msg) 235 public void OarLoadingAlert(string msg)