aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-04-12 12:44:41 +0000
committerMelanie Thielker2009-04-12 12:44:41 +0000
commit9d31cfafb2a120c7f5675aef1b093f3077392734 (patch)
tree1d29d4e777073fc2171fcadad86bc3f4baefbc9a
parentActually remove the script if it tries to remove itself. (diff)
downloadopensim-SC_OLD-9d31cfafb2a120c7f5675aef1b093f3077392734.zip
opensim-SC_OLD-9d31cfafb2a120c7f5675aef1b093f3077392734.tar.gz
opensim-SC_OLD-9d31cfafb2a120c7f5675aef1b093f3077392734.tar.bz2
opensim-SC_OLD-9d31cfafb2a120c7f5675aef1b093f3077392734.tar.xz
Funnel stored (offline) IMs through the Scene EventManager to make sure
they are processed by the modules rather than sent to the client directly. Allows friends and group requests and responses to be saved, too
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs24
1 files changed, 10 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index a521ead..09a75e2 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -148,19 +148,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
148 //client.OnEconomyDataRequest += OnEconomyDataRequest; 148 //client.OnEconomyDataRequest += OnEconomyDataRequest;
149 } 149 }
150 150
151 // TODO: Remove method when mute lists are supported
152 //
153 //private void OnEconomyDataRequest(UUID agentID)
154 //{
155 // IClientAPI client = FindClient(agentID);
156 // if (client == null)
157 // {
158 // m_log.ErrorFormat("[OFFLINE MESSAGING] Can't find client {0}", agentID.ToString());
159 // return;
160 // }
161 // RetrieveInstantMessages(client);
162 //}
163
164 private void RetrieveInstantMessages(IClientAPI client) 151 private void RetrieveInstantMessages(IClientAPI client)
165 { 152 {
166 m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId); 153 m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId);
@@ -173,7 +160,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
173 DateTime saved = Util.ToDateTime((uint)im.timestamp); 160 DateTime saved = Util.ToDateTime((uint)im.timestamp);
174 161
175 im.message = "(saved " + saved.ToString() + ") " + im.message; 162 im.message = "(saved " + saved.ToString() + ") " + im.message;
176 client.SendInstantMessage(im); 163
164 // client.SendInstantMessage(im);
165
166 // Send through scene event manager so all modules get a chance
167 // to look at this message before it gets delivered.
168 //
169 // Needed for proper state management for stored group
170 // invitations
171 //
172 client.Scene.EventManager.TriggerIncomingInstantMessage(im);
177 } 173 }
178 } 174 }
179 175