diff options
author | Melanie Thielker | 2009-03-17 23:52:30 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-03-17 23:52:30 +0000 |
commit | 87822c5d958f4ea10269d6eb646a6288681d4718 (patch) | |
tree | 4c8b9b138ecba85aa509230f33e3ee6b601ca129 /OpenSim/Region/CoreModules/Avatar | |
parent | * minor: remove compiler warning (diff) | |
download | opensim-SC-87822c5d958f4ea10269d6eb646a6288681d4718.zip opensim-SC-87822c5d958f4ea10269d6eb646a6288681d4718.tar.gz opensim-SC-87822c5d958f4ea10269d6eb646a6288681d4718.tar.bz2 opensim-SC-87822c5d958f4ea10269d6eb646a6288681d4718.tar.xz |
Add an event to process undelivered IMs
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 94a856b..f67bb0b 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -48,6 +48,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
48 | protected List<Scene> m_Scenes = new List<Scene>(); | 48 | protected List<Scene> m_Scenes = new List<Scene>(); |
49 | protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>(); | 49 | protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>(); |
50 | 50 | ||
51 | public event UndeliveredMessage OnUndeliveredMessage; | ||
52 | |||
51 | public virtual void Initialise(Scene scene, IConfigSource config) | 53 | public virtual void Initialise(Scene scene, IConfigSource config) |
52 | { | 54 | { |
53 | IConfig cnf = config.Configs["Messaging"]; | 55 | IConfig cnf = config.Configs["Messaging"]; |
@@ -165,6 +167,18 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
165 | return; | 167 | return; |
166 | } | 168 | } |
167 | 169 | ||
170 | UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage; | ||
171 | |||
172 | // If this event has handlers, then the IM will be considered | ||
173 | // delivered. This will suppress the error message. | ||
174 | // | ||
175 | if (handlerUndeliveredMessage != null) | ||
176 | { | ||
177 | handlerUndeliveredMessage(im); | ||
178 | result(true); | ||
179 | return; | ||
180 | } | ||
181 | |||
168 | //m_log.DebugFormat("[INSTANT MESSAGE]: Undeliverable"); | 182 | //m_log.DebugFormat("[INSTANT MESSAGE]: Undeliverable"); |
169 | result(false); | 183 | result(false); |
170 | return; | 184 | return; |