* 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
0.6.1-post-fixes
Adam Frisby 2008-11-08 17:46:10 +00:00
parent 9511a8c763
commit 5a5e132a96
1 changed files with 16 additions and 0 deletions

View File

@ -28,6 +28,7 @@
using System; using System;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Client;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using Caps=OpenSim.Framework.Communications.Capabilities.Caps; using Caps=OpenSim.Framework.Communications.Capabilities.Caps;
using System.Collections.Generic; using System.Collections.Generic;
@ -55,8 +56,16 @@ namespace OpenSim.Region.Environment.Scenes
public event OnBackupDelegate OnBackup; public event OnBackupDelegate OnBackup;
public delegate void OnClientConnectCoreDelegate(IClientCore client);
public event OnClientConnectCoreDelegate OnClientConnect;
public delegate void OnNewClientDelegate(IClientAPI client); public delegate void OnNewClientDelegate(IClientAPI client);
/// <summary>
/// Depreciated in favour of OnClientConnect.
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
/// </summary>
public event OnNewClientDelegate OnNewClient; public event OnNewClientDelegate OnNewClient;
public delegate void OnNewPresenceDelegate(ScenePresence presence); public delegate void OnNewPresenceDelegate(ScenePresence presence);
@ -323,6 +332,7 @@ namespace OpenSim.Region.Environment.Scenes
private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole;
private OnFrameDelegate handlerFrame = null; //OnFrame; private OnFrameDelegate handlerFrame = null; //OnFrame;
private OnNewClientDelegate handlerNewClient = null; //OnNewClient; private OnNewClientDelegate handlerNewClient = null; //OnNewClient;
private OnClientConnectCoreDelegate handlerClientConnect = null; //OnClientConnect
private OnNewPresenceDelegate handlerNewPresence = null; //OnNewPresence; private OnNewPresenceDelegate handlerNewPresence = null; //OnNewPresence;
private OnRemovePresenceDelegate handlerRemovePresence = null; //OnRemovePresence; private OnRemovePresenceDelegate handlerRemovePresence = null; //OnRemovePresence;
private OnBackupDelegate handlerBackup = null; //OnBackup; private OnBackupDelegate handlerBackup = null; //OnBackup;
@ -426,6 +436,12 @@ namespace OpenSim.Region.Environment.Scenes
handlerNewClient = OnNewClient; handlerNewClient = OnNewClient;
if (handlerNewClient != null) if (handlerNewClient != null)
handlerNewClient(client); handlerNewClient(client);
if (client is IClientCore)
{
handlerClientConnect = OnClientConnect;
handlerClientConnect((IClientCore) client);
}
} }
public void TriggerOnNewPresence(ScenePresence presence) public void TriggerOnNewPresence(ScenePresence presence)