diff options
author | Teravus Ovares | 2008-04-10 18:30:34 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-10 18:30:34 +0000 |
commit | 50c5e6af1086df7c0f17c4f75091dbcadb776846 (patch) | |
tree | cb2d95a5409f6af3643733122aed1b3494128af4 /OpenSim/Region/Environment/Modules/InstantMessageModule.cs | |
parent | * Minor: really just comment and subsequent indentation adjustment. Preparat... (diff) | |
download | opensim-SC_OLD-50c5e6af1086df7c0f17c4f75091dbcadb776846.zip opensim-SC_OLD-50c5e6af1086df7c0f17c4f75091dbcadb776846.tar.gz opensim-SC_OLD-50c5e6af1086df7c0f17c4f75091dbcadb776846.tar.bz2 opensim-SC_OLD-50c5e6af1086df7c0f17c4f75091dbcadb776846.tar.xz |
* 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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/InstantMessageModule.cs | 20 |
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 | } |