diff options
author | Justin Clark-Casey (justincc) | 2012-07-18 23:35:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-18 23:35:05 +0100 |
commit | 528004d34988d8d2349f18ff7d78c6dd50ab8b2d (patch) | |
tree | cc5d484e9a803415441fce5868b2ba965d9ff737 /OpenSim/Region/OptionalModules | |
parent | Stop the 15 second initial script compile wait if a script is being rezzed on... (diff) | |
download | opensim-SC-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.zip opensim-SC-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.gz opensim-SC-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.bz2 opensim-SC-528004d34988d8d2349f18ff7d78c6dd50ab8b2d.tar.xz |
Perform other region ready actions even if simulator is configured to leave logins disabled on startup.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | 45 |
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; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Text; | 33 | using System.Text; |
34 | |||
35 | using log4net; | 34 | using log4net; |
36 | using Nini.Config; | 35 | using Nini.Config; |
37 | using OpenMetaverse; | 36 | using OpenMetaverse; |
38 | using OpenMetaverse.StructuredData; | 37 | using OpenMetaverse.StructuredData; |
39 | using OpenSim.Services.Interfaces; | ||
40 | |||
41 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
42 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Services.Interfaces; | ||
44 | 42 | ||
45 | namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | 43 | namespace 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) |