diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index d783e57..418904f 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -500,15 +500,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
500 | public delegate void RegionHeartbeatEnd(Scene scene); | 500 | public delegate void RegionHeartbeatEnd(Scene scene); |
501 | public event RegionHeartbeatEnd OnRegionHeartbeatEnd; | 501 | public event RegionHeartbeatEnd OnRegionHeartbeatEnd; |
502 | 502 | ||
503 | public delegate void LoginsEnabled(string regionName); | 503 | /// <summary> |
504 | /// Fired when logins to a region are enabled or disabled. | ||
505 | /// </summary> | ||
506 | /// <remarks> | ||
507 | /// | ||
508 | /// </remarks> | ||
509 | /// Fired | ||
510 | public event RegionLoginsStatusChange OnRegionLoginsStatusChange; | ||
511 | public delegate void RegionLoginsStatusChange(IScene scene); | ||
504 | 512 | ||
505 | /// <summary> | 513 | /// <summary> |
506 | /// This should only fire in all circumstances if the RegionReady module is active. | 514 | /// Fired when a region is considered ready for use. |
507 | /// </summary> | 515 | /// </summary> |
508 | /// <remarks> | 516 | /// <remarks> |
509 | /// TODO: Fire this even when the RegionReady module is not active. | 517 | /// A region is considered ready when startup operations such as loading of scripts already on the region |
518 | /// have been completed. | ||
510 | /// </remarks> | 519 | /// </remarks> |
511 | public event LoginsEnabled OnLoginsEnabled; | 520 | public event RegionReady OnRegionReady; |
521 | public delegate void RegionReady(IScene scene); | ||
512 | 522 | ||
513 | public delegate void PrimsLoaded(Scene s); | 523 | public delegate void PrimsLoaded(Scene s); |
514 | public event PrimsLoaded OnPrimsLoaded; | 524 | public event PrimsLoaded OnPrimsLoaded; |
@@ -2502,21 +2512,42 @@ namespace OpenSim.Region.Framework.Scenes | |||
2502 | } | 2512 | } |
2503 | } | 2513 | } |
2504 | 2514 | ||
2505 | public void TriggerLoginsEnabled (string regionName) | 2515 | public void TriggerRegionLoginsStatusChange(IScene scene) |
2506 | { | 2516 | { |
2507 | LoginsEnabled handler = OnLoginsEnabled; | 2517 | RegionLoginsStatusChange handler = OnRegionLoginsStatusChange; |
2508 | 2518 | ||
2509 | if ( handler != null) | 2519 | if (handler != null) |
2510 | { | 2520 | { |
2511 | foreach (LoginsEnabled d in handler.GetInvocationList()) | 2521 | foreach (RegionLoginsStatusChange d in handler.GetInvocationList()) |
2512 | { | 2522 | { |
2513 | try | 2523 | try |
2514 | { | 2524 | { |
2515 | d(regionName); | 2525 | d(scene); |
2526 | } | ||
2527 | catch (Exception e) | ||
2528 | { | ||
2529 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionLoginsStatusChange failed - continuing {0} - {1}", | ||
2530 | e.Message, e.StackTrace); | ||
2531 | } | ||
2532 | } | ||
2533 | } | ||
2534 | } | ||
2535 | |||
2536 | public void TriggerRegionReady(IScene scene) | ||
2537 | { | ||
2538 | RegionReady handler = OnRegionReady; | ||
2539 | |||
2540 | if (handler != null) | ||
2541 | { | ||
2542 | foreach (RegionReady d in handler.GetInvocationList()) | ||
2543 | { | ||
2544 | try | ||
2545 | { | ||
2546 | d(scene); | ||
2516 | } | 2547 | } |
2517 | catch (Exception e) | 2548 | catch (Exception e) |
2518 | { | 2549 | { |
2519 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for LoginsEnabled failed - continuing {0} - {1}", | 2550 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionReady failed - continuing {0} - {1}", |
2520 | e.Message, e.StackTrace); | 2551 | e.Message, e.StackTrace); |
2521 | } | 2552 | } |
2522 | } | 2553 | } |