From 5a5e132a96d557bf79ac281f11e4324cac2d2ddf Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 8 Nov 2008 17:46:10 +0000 Subject: * Implemented OnClientConnect in Scene EventManager * Identical to OnNewClient except it passes IClientCore instead of IClientAPI * See http://opensimulator.org/wiki/OpenSim_0.6_IClientAPI#Porting_Guide --- OpenSim/Region/Environment/Scenes/EventManager.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index 99aac93..244b76f8 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs @@ -28,6 +28,7 @@ using System; using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Framework.Client; using OpenSim.Region.Environment.Interfaces; using Caps=OpenSim.Framework.Communications.Capabilities.Caps; using System.Collections.Generic; @@ -55,8 +56,16 @@ namespace OpenSim.Region.Environment.Scenes public event OnBackupDelegate OnBackup; + public delegate void OnClientConnectCoreDelegate(IClientCore client); + + public event OnClientConnectCoreDelegate OnClientConnect; + public delegate void OnNewClientDelegate(IClientAPI client); + /// + /// Depreciated in favour of OnClientConnect. + /// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces. + /// public event OnNewClientDelegate OnNewClient; public delegate void OnNewPresenceDelegate(ScenePresence presence); @@ -323,6 +332,7 @@ namespace OpenSim.Region.Environment.Scenes private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; private OnFrameDelegate handlerFrame = null; //OnFrame; private OnNewClientDelegate handlerNewClient = null; //OnNewClient; + private OnClientConnectCoreDelegate handlerClientConnect = null; //OnClientConnect private OnNewPresenceDelegate handlerNewPresence = null; //OnNewPresence; private OnRemovePresenceDelegate handlerRemovePresence = null; //OnRemovePresence; private OnBackupDelegate handlerBackup = null; //OnBackup; @@ -426,6 +436,12 @@ namespace OpenSim.Region.Environment.Scenes handlerNewClient = OnNewClient; if (handlerNewClient != null) handlerNewClient(client); + + if (client is IClientCore) + { + handlerClientConnect = OnClientConnect; + handlerClientConnect((IClientCore) client); + } } public void TriggerOnNewPresence(ScenePresence presence) -- cgit v1.1