diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 209a0a6..74d9e60 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -405,6 +405,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
405 | public delegate void RegionUp(GridRegion region); | 405 | public delegate void RegionUp(GridRegion region); |
406 | public event RegionUp OnRegionUp; | 406 | public event RegionUp OnRegionUp; |
407 | 407 | ||
408 | public delegate void RegionStarted(Scene scene); | ||
409 | public event RegionStarted OnRegionStarted; | ||
410 | |||
408 | public delegate void LoginsEnabled(string regionName); | 411 | public delegate void LoginsEnabled(string regionName); |
409 | public event LoginsEnabled OnLoginsEnabled; | 412 | public event LoginsEnabled OnLoginsEnabled; |
410 | 413 | ||
@@ -2267,6 +2270,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
2267 | } | 2270 | } |
2268 | } | 2271 | } |
2269 | 2272 | ||
2273 | public void TriggerOnRegionStarted(Scene scene) | ||
2274 | { | ||
2275 | RegionStarted handler = OnRegionStarted; | ||
2276 | |||
2277 | if (handler != null) | ||
2278 | { | ||
2279 | foreach (RegionStarted d in handler.GetInvocationList()) | ||
2280 | { | ||
2281 | try | ||
2282 | { | ||
2283 | d(scene); | ||
2284 | } | ||
2285 | catch (Exception e) | ||
2286 | { | ||
2287 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}", | ||
2288 | e.Message, e.StackTrace); | ||
2289 | } | ||
2290 | } | ||
2291 | } | ||
2292 | } | ||
2293 | |||
2270 | public void TriggerLoginsEnabled (string regionName) | 2294 | public void TriggerLoginsEnabled (string regionName) |
2271 | { | 2295 | { |
2272 | LoginsEnabled handler = OnLoginsEnabled; | 2296 | LoginsEnabled handler = OnLoginsEnabled; |