diff options
author | ubit | 2012-08-02 18:21:08 +0200 |
---|---|---|
committer | ubit | 2012-08-02 18:21:08 +0200 |
commit | 254d3e1ad31f99770074abb49fec03c90d99b246 (patch) | |
tree | fe2d2337f0fffec0f44a9f35442d73c8fe78fda3 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | i local libs commit (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.zip opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.gz opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.bz2 opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.xz |
merge crap gerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Conflicts:
bin/Regions/Regions.ini.example
bin/lib32/BulletSim.dll
bin/lib32/libBulletSim.so
bin/lib64/BulletSim.dll
bin/lib64/libBulletSim.so
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index d783e57..7cb3811 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -500,15 +500,24 @@ 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 Action<IScene> OnRegionReadyStatusChange; |
512 | 521 | ||
513 | public delegate void PrimsLoaded(Scene s); | 522 | public delegate void PrimsLoaded(Scene s); |
514 | public event PrimsLoaded OnPrimsLoaded; | 523 | public event PrimsLoaded OnPrimsLoaded; |
@@ -2502,21 +2511,42 @@ namespace OpenSim.Region.Framework.Scenes | |||
2502 | } | 2511 | } |
2503 | } | 2512 | } |
2504 | 2513 | ||
2505 | public void TriggerLoginsEnabled (string regionName) | 2514 | public void TriggerRegionLoginsStatusChange(IScene scene) |
2506 | { | 2515 | { |
2507 | LoginsEnabled handler = OnLoginsEnabled; | 2516 | RegionLoginsStatusChange handler = OnRegionLoginsStatusChange; |
2508 | 2517 | ||
2509 | if ( handler != null) | 2518 | if (handler != null) |
2510 | { | 2519 | { |
2511 | foreach (LoginsEnabled d in handler.GetInvocationList()) | 2520 | foreach (RegionLoginsStatusChange d in handler.GetInvocationList()) |
2512 | { | 2521 | { |
2513 | try | 2522 | try |
2514 | { | 2523 | { |
2515 | d(regionName); | 2524 | d(scene); |
2525 | } | ||
2526 | catch (Exception e) | ||
2527 | { | ||
2528 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionLoginsStatusChange failed - continuing {0} - {1}", | ||
2529 | e.Message, e.StackTrace); | ||
2530 | } | ||
2531 | } | ||
2532 | } | ||
2533 | } | ||
2534 | |||
2535 | public void TriggerRegionReadyStatusChange(IScene scene) | ||
2536 | { | ||
2537 | Action<IScene> handler = OnRegionReadyStatusChange; | ||
2538 | |||
2539 | if (handler != null) | ||
2540 | { | ||
2541 | foreach (Action<IScene> d in handler.GetInvocationList()) | ||
2542 | { | ||
2543 | try | ||
2544 | { | ||
2545 | d(scene); | ||
2516 | } | 2546 | } |
2517 | catch (Exception e) | 2547 | catch (Exception e) |
2518 | { | 2548 | { |
2519 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for LoginsEnabled failed - continuing {0} - {1}", | 2549 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionReadyStatusChange failed - continuing {0} - {1}", |
2520 | e.Message, e.StackTrace); | 2550 | e.Message, e.StackTrace); |
2521 | } | 2551 | } |
2522 | } | 2552 | } |