aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/InstantMessageModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/InstantMessageModule.cs20
1 files changed, 20 insertions, 0 deletions
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
82 // Don't send a Friend Dialog IM with a LLUUID.Zero session. 82 // Don't send a Friend Dialog IM with a LLUUID.Zero session.
83 if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero)) 83 if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero))
84 { 84 {
85 // Try root avatar only first
85 foreach (Scene scene in m_scenes) 86 foreach (Scene scene in m_scenes)
86 { 87 {
87 if (scene.Entities.ContainsKey(toAgentID) && scene.Entities[toAgentID] is ScenePresence) 88 if (scene.Entities.ContainsKey(toAgentID) && scene.Entities[toAgentID] is ScenePresence)
@@ -98,8 +99,27 @@ namespace OpenSim.Region.Environment.Modules
98 } 99 }
99 } 100 }
100 } 101 }
102
103 // try child avatar second
104 foreach (Scene scene in m_scenes)
105 {
106 if (scene.Entities.ContainsKey(toAgentID) && scene.Entities[toAgentID] is ScenePresence)
107 {
108 // Local message
109 ScenePresence user = (ScenePresence)scene.Entities[toAgentID];
110
111 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
112 toAgentID, imSessionID, fromAgentName, dialog,
113 timestamp);
114 // Message sent
115 return;
116
117 }
118 }
119
101 } 120 }
102 121
122
103 // Still here, try send via Grid 123 // Still here, try send via Grid
104 // TODO 124 // TODO
105 } 125 }