From 50c5e6af1086df7c0f17c4f75091dbcadb776846 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 10 Apr 2008 18:30:34 +0000 Subject: * 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. --- .../Environment/Modules/InstantMessageModule.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/Environment/Modules/InstantMessageModule.cs') diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index 6f7235e..6e13b73 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs @@ -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 } -- cgit v1.1