Actually do what I promised in the previous commit :/
parent
9d31cfafb2
commit
87ce5ea0eb
|
@ -129,6 +129,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Scene FindScene(UUID agentID)
|
||||||
|
{
|
||||||
|
foreach (Scene s in m_SceneList)
|
||||||
|
{
|
||||||
|
ScenePresence presence = s.GetScenePresence(agentID);
|
||||||
|
if (presence != null && !presence.IsChildAgent)
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private IClientAPI FindClient(UUID agentID)
|
private IClientAPI FindClient(UUID agentID)
|
||||||
{
|
{
|
||||||
foreach (Scene s in m_SceneList)
|
foreach (Scene s in m_SceneList)
|
||||||
|
@ -143,9 +154,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
private void OnNewClient(IClientAPI client)
|
private void OnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
client.OnRetrieveInstantMessages += RetrieveInstantMessages;
|
client.OnRetrieveInstantMessages += RetrieveInstantMessages;
|
||||||
// TODO:: Remove when mute lists are supported
|
|
||||||
//
|
|
||||||
//client.OnEconomyDataRequest += OnEconomyDataRequest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RetrieveInstantMessages(IClientAPI client)
|
private void RetrieveInstantMessages(IClientAPI client)
|
||||||
|
@ -169,7 +177,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
// Needed for proper state management for stored group
|
// Needed for proper state management for stored group
|
||||||
// invitations
|
// invitations
|
||||||
//
|
//
|
||||||
client.Scene.EventManager.TriggerIncomingInstantMessage(im);
|
Scene s = FindScene(client.AgentId);
|
||||||
|
if (s != null)
|
||||||
|
s.EventManager.TriggerIncomingInstantMessage(im);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue