aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs53
1 files changed, 23 insertions, 30 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index e09e633..6b09c3b 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -99,14 +99,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
99 m_lastOarLoadedOk = true; 99 m_lastOarLoadedOk = true;
100 100
101 m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded; 101 m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
102 m_scene.EventManager.OnRezScript += OnRezScript;
103 102
104 m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName); 103 m_log.DebugFormat("[RegionReady]: Enabled for region {0}", scene.RegionInfo.RegionName);
105 104
106 if (m_disable_logins) 105 if (m_disable_logins)
107 { 106 {
107 m_scene.LoginLock = true;
108 m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled; 108 m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
109 scene.LoginLock = true; 109 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
110
110 m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); 111 m_log.InfoFormat("[RegionReady]: Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
111 112
112 if (m_uri != string.Empty) 113 if (m_uri != string.Empty)
@@ -116,16 +117,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
116 } 117 }
117 } 118 }
118 119
119 void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource)
120 {
121 if (!m_ScriptRez)
122 {
123 m_ScriptRez = true;
124 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
125 m_scene.EventManager.OnRezScript -= OnRezScript;
126 }
127 }
128
129 public void RemoveRegion(Scene scene) 120 public void RemoveRegion(Scene scene)
130 { 121 {
131 if (!m_enabled) 122 if (!m_enabled)
@@ -134,7 +125,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
134 m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded; 125 m_scene.EventManager.OnOarFileLoaded -= OnOarFileLoaded;
135 126
136 if (m_disable_logins) 127 if (m_disable_logins)
128 {
137 m_scene.EventManager.OnLoginsEnabled -= OnLoginsEnabled; 129 m_scene.EventManager.OnLoginsEnabled -= OnLoginsEnabled;
130 m_scene.EventManager.OnEmptyScriptCompileQueue -= OnEmptyScriptCompileQueue;
131 }
138 132
139 if (m_uri != string.Empty) 133 if (m_uri != string.Empty)
140 { 134 {
@@ -249,25 +243,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
249 { 243 {
250 // Let's bypass this for now until some better feedback can be established 244 // Let's bypass this for now until some better feedback can be established
251 // 245 //
252 return;
253 246
254 if (msg == "load") 247// if (msg == "load")
255 { 248// {
256 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; 249// m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
257 m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded; 250// m_scene.EventManager.OnOarFileLoaded += OnOarFileLoaded;
258 m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled; 251// m_scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
259 m_scene.EventManager.OnRezScript += OnRezScript; 252// m_scene.EventManager.OnRezScript += OnRezScript;
260 m_oarFileLoading = true; 253// m_oarFileLoading = true;
261 m_firstEmptyCompileQueue = true; 254// m_firstEmptyCompileQueue = true;
262 255//
263 m_scene.LoginsDisabled = true; 256// m_scene.LoginsDisabled = true;
264 m_scene.LoginLock = true; 257// m_scene.LoginLock = true;
265 if ( m_uri != string.Empty ) 258// if ( m_uri != string.Empty )
266 { 259// {
267 RRAlert("loading oar"); 260// RRAlert("loading oar");
268 RRAlert("disabled"); 261// RRAlert("disabled");
269 } 262// }
270 } 263// }
271 } 264 }
272 265
273 public void RRAlert(string status) 266 public void RRAlert(string status)