aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorBlueWall2011-05-28 11:11:01 -0400
committerBlueWall2011-05-28 16:20:10 -0400
commitc7e18f9017302991f7a4411293ef2fbb20cc9b5a (patch)
tree79f3058a7f7b30e0e70257478715015539ffbdf1 /OpenSim/Region/Framework/Scenes
parentAdd option to disable logins (diff)
downloadopensim-SC-c7e18f9017302991f7a4411293ef2fbb20cc9b5a.zip
opensim-SC-c7e18f9017302991f7a4411293ef2fbb20cc9b5a.tar.gz
opensim-SC-c7e18f9017302991f7a4411293ef2fbb20cc9b5a.tar.bz2
opensim-SC-c7e18f9017302991f7a4411293ef2fbb20cc9b5a.tar.xz
Adding an event to signal that logins are enabled
Added an event to signal the eabling of logins and added an alert to send to a configured service.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs3
2 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index e04317b..b43d5f0 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -389,6 +389,9 @@ namespace OpenSim.Region.Framework.Scenes
389 public delegate void RegionUp(GridRegion region); 389 public delegate void RegionUp(GridRegion region);
390 public event RegionUp OnRegionUp; 390 public event RegionUp OnRegionUp;
391 391
392 public delegate void LoginsEnabled(string regionName);
393 public event LoginsEnabled OnLoginsEnabled;
394
392 public class MoneyTransferArgs : EventArgs 395 public class MoneyTransferArgs : EventArgs
393 { 396 {
394 public UUID sender; 397 public UUID sender;
@@ -2218,5 +2221,26 @@ namespace OpenSim.Region.Framework.Scenes
2218 } 2221 }
2219 } 2222 }
2220 } 2223 }
2224
2225 public void TriggerLoginsEnabled (string regionName)
2226 {
2227 LoginsEnabled handler = OnLoginsEnabled;
2228
2229 if ( handler != null)
2230 {
2231 foreach (LoginsEnabled d in handler.GetInvocationList())
2232 {
2233 try
2234 {
2235 d(regionName);
2236 }
2237 catch (Exception e)
2238 {
2239 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for LoginsEnabled failed - continuing {0} - {1}",
2240 e.Message, e.StackTrace);
2241 }
2242 }
2243 }
2244 }
2221 } 2245 }
2222} 2246}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index e9f5f9e..1d562fd 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1376,9 +1376,12 @@ namespace OpenSim.Region.Framework.Scenes
1376 IConfig startupConfig = m_config.Configs["Startup"]; 1376 IConfig startupConfig = m_config.Configs["Startup"];
1377 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false)) 1377 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
1378 { 1378 {
1379 // This handles a case of a region having no scripts for the RegionReady module
1379 if (m_sceneGraph.GetActiveScriptsCount() == 0) 1380 if (m_sceneGraph.GetActiveScriptsCount() == 0)
1380 { 1381 {
1382 // need to be able to tell these have changed in RegionReady
1381 LoginLock = false; 1383 LoginLock = false;
1384 EventManager.TriggerLoginsEnabled(RegionInfo.RegionName);
1382 } 1385 }
1383 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); 1386 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1384 // For RegionReady lockouts 1387 // For RegionReady lockouts