Merge commit '3142982353a121920e571e5b33acffc065b20a2e' into bigmerge
commit
c0555f6be6
|
@ -302,41 +302,24 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find the scene for an agent
|
/// Find the root client for a ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Scene GetClientScene(UUID agentId)
|
public IClientAPI LocateClientObject(UUID agentID)
|
||||||
{
|
{
|
||||||
lock (m_Scenes)
|
lock (m_Scenes)
|
||||||
{
|
{
|
||||||
foreach (Scene scene in m_Scenes)
|
foreach (Scene scene in m_Scenes)
|
||||||
{
|
{
|
||||||
ScenePresence presence = scene.GetScenePresence(agentId);
|
ScenePresence presence = scene.GetScenePresence(agentID);
|
||||||
if (presence != null && !presence.IsChildAgent)
|
if (presence != null && !presence.IsChildAgent)
|
||||||
return scene;
|
return presence.ControllingClient;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Find the client for a ID
|
|
||||||
/// </summary>
|
|
||||||
public IClientAPI LocateClientObject(UUID agentID)
|
|
||||||
{
|
|
||||||
Scene scene = GetClientScene(agentID);
|
|
||||||
if (scene != null)
|
|
||||||
{
|
|
||||||
ScenePresence presence = scene.GetScenePresence(agentID);
|
|
||||||
if (presence != null)
|
|
||||||
return presence.ControllingClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region IInstantMessageSimConnector
|
#region IInstantMessageSimConnector
|
||||||
public bool SendInstantMessage(GridInstantMessage im)
|
public bool SendInstantMessage(GridInstantMessage im)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue