diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 57e1c37..ac04462 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -66,13 +66,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
66 | public event OnClientConnectCoreDelegate OnClientConnect; | 66 | public event OnClientConnectCoreDelegate OnClientConnect; |
67 | 67 | ||
68 | public delegate void OnNewClientDelegate(IClientAPI client); | 68 | public delegate void OnNewClientDelegate(IClientAPI client); |
69 | 69 | ||
70 | /// <summary> | 70 | /// <summary> |
71 | /// Deprecated in favour of OnClientConnect. | 71 | /// Deprecated in favour of OnClientConnect. |
72 | /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. | 72 | /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. |
73 | /// </summary> | 73 | /// </summary> |
74 | public event OnNewClientDelegate OnNewClient; | 74 | public event OnNewClientDelegate OnNewClient; |
75 | 75 | ||
76 | public delegate void OnClientLoginDelegate(IClientAPI client); | ||
77 | public event OnClientLoginDelegate OnClientLogin; | ||
78 | |||
76 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | 79 | public delegate void OnNewPresenceDelegate(ScenePresence presence); |
77 | 80 | ||
78 | public event OnNewPresenceDelegate OnNewPresence; | 81 | public event OnNewPresenceDelegate OnNewPresence; |
@@ -583,6 +586,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
583 | } | 586 | } |
584 | } | 587 | } |
585 | 588 | ||
589 | public void TriggerOnClientLogin(IClientAPI client) | ||
590 | { | ||
591 | OnClientLoginDelegate handlerClientLogin = OnClientLogin; | ||
592 | if (handlerClientLogin != null) | ||
593 | { | ||
594 | foreach (OnClientLoginDelegate d in handlerClientLogin.GetInvocationList()) | ||
595 | { | ||
596 | try | ||
597 | { | ||
598 | d(client); | ||
599 | } | ||
600 | catch (Exception e) | ||
601 | { | ||
602 | m_log.ErrorFormat( | ||
603 | "[EVENT MANAGER]: Delegate for TriggerOnClientLogin failed - continuing. {0} {1}", | ||
604 | e.Message, e.StackTrace); | ||
605 | } | ||
606 | } | ||
607 | } | ||
608 | |||
609 | } | ||
610 | |||
586 | public void TriggerOnNewPresence(ScenePresence presence) | 611 | public void TriggerOnNewPresence(ScenePresence presence) |
587 | { | 612 | { |
588 | OnNewPresenceDelegate handlerNewPresence = OnNewPresence; | 613 | OnNewPresenceDelegate handlerNewPresence = OnNewPresence; |