Next step in the presence module - some core plumbing included at

no extra cost
0.6.1-post-fixes
Melanie Thielker 2008-11-22 22:56:00 +00:00
parent 336fc239bb
commit 2fa072b579
3 changed files with 33 additions and 0 deletions

View File

@ -75,7 +75,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
if (m_Gridmode)
NotifyMessageServerOfStartup(scene);
scene.RegisterModuleInterface<IPresenceModule>(this);
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
m_Scenes.Add(scene);
}
}
@ -107,6 +112,19 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{
}
public void OnNewClient(IClientAPI client)
{
client.OnConnectionClosed += OnConnectionClosed;
}
public void OnConnectionClosed(IClientAPI client)
{
}
public void OnSetRootAgentScene(UUID agentID)
{
}
private void NotifyMessageServerOfStartup(Scene scene)
{
Hashtable xmlrpcdata = new Hashtable();

View File

@ -98,6 +98,10 @@ namespace OpenSim.Region.Environment.Scenes
public delegate void OnPermissionErrorDelegate(UUID user, string reason);
public delegate void OnSetRootAgentSceneDelegate(UUID agentID);
public event OnSetRootAgentSceneDelegate OnSetRootAgentScene;
public event ObjectGrabDelegate OnObjectGrab;
public event ObjectDeGrabDelegate OnObjectDeGrab;
public event ScriptResetDelegate OnScriptReset;
@ -389,6 +393,8 @@ namespace OpenSim.Region.Environment.Scenes
private GetScriptRunning handlerGetScriptRunning = null;
private SunLindenHour handlerSunGetLindenHour = null;
private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null;
public void TriggerGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
{
@ -912,5 +918,12 @@ namespace OpenSim.Region.Environment.Scenes
if (handlerCollidingEnd != null)
handlerCollidingEnd(localId, colliders);
}
public void TriggerSetRootAgentScene(UUID agentID)
{
handlerSetRootAgentScene = OnSetRootAgentScene;
if (handlerSetRootAgentScene != null)
handlerSetRootAgentScene(agentID);
}
}
}

View File

@ -4214,6 +4214,8 @@ namespace OpenSim.Region.Environment.Scenes
return;
inv.SetRootAgentScene(agentID, this);
EventManager.TriggerSetRootAgentScene(agentID);
}
public bool NeedSceneCacheClear(UUID agentID)