mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
* With Grid Comms up in the air.. I decided have the friends module update you when your friends come online if they're at least a child agent on the sim. offline status works the same also. So does Instant Message.
* This is until Grid Comms matures a bit more on this. * This should also work in Standalone as it uses the IUserData interface.
This commit is contained in:
@@ -82,6 +82,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||
// Don't send a Friend Dialog IM with a LLUUID.Zero session.
|
||||
if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero))
|
||||
{
|
||||
// Try root avatar only first
|
||||
foreach (Scene scene in m_scenes)
|
||||
{
|
||||
if (scene.Entities.ContainsKey(toAgentID) && scene.Entities[toAgentID] is ScenePresence)
|
||||
@@ -98,8 +99,27 @@ namespace OpenSim.Region.Environment.Modules
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// try child avatar second
|
||||
foreach (Scene scene in m_scenes)
|
||||
{
|
||||
if (scene.Entities.ContainsKey(toAgentID) && scene.Entities[toAgentID] is ScenePresence)
|
||||
{
|
||||
// Local message
|
||||
ScenePresence user = (ScenePresence)scene.Entities[toAgentID];
|
||||
|
||||
user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
|
||||
toAgentID, imSessionID, fromAgentName, dialog,
|
||||
timestamp);
|
||||
// Message sent
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Still here, try send via Grid
|
||||
// TODO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user