mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Initial Online friends notification seems to be working reliably now. All this needs more testing, but everything is there.
This commit is contained in:
@@ -66,13 +66,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public event OnClientConnectCoreDelegate OnClientConnect;
|
||||
|
||||
public delegate void OnNewClientDelegate(IClientAPI client);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Deprecated in favour of OnClientConnect.
|
||||
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
|
||||
/// </summary>
|
||||
public event OnNewClientDelegate OnNewClient;
|
||||
|
||||
public delegate void OnClientLoginDelegate(IClientAPI client);
|
||||
public event OnClientLoginDelegate OnClientLogin;
|
||||
|
||||
public delegate void OnNewPresenceDelegate(ScenePresence presence);
|
||||
|
||||
public event OnNewPresenceDelegate OnNewPresence;
|
||||
@@ -583,6 +586,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerOnClientLogin(IClientAPI client)
|
||||
{
|
||||
OnClientLoginDelegate handlerClientLogin = OnClientLogin;
|
||||
if (handlerClientLogin != null)
|
||||
{
|
||||
foreach (OnClientLoginDelegate d in handlerClientLogin.GetInvocationList())
|
||||
{
|
||||
try
|
||||
{
|
||||
d(client);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[EVENT MANAGER]: Delegate for TriggerOnClientLogin failed - continuing. {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void TriggerOnNewPresence(ScenePresence presence)
|
||||
{
|
||||
OnNewPresenceDelegate handlerNewPresence = OnNewPresence;
|
||||
|
||||
Reference in New Issue
Block a user