From 74410efb22046688f0b3abe84ef4fdda8b166da6 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 8 Jul 2007 03:45:06 +0000 Subject: * Bugfix with instant message handlers. Looking at implementing grid IM server, ideally using a known scalable infrastructure. --- OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 4cb0bec..e078348 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -110,10 +110,16 @@ namespace OpenSim.Region.Environment.Scenes { if (this.Avatars.ContainsKey(toAgentID)) { - // Local sim message - ScenePresence avatar = this.Avatars[toAgentID]; - - avatar.ControllingClient.SendInstantMessage(message, toAgentID); + if (this.Avatars.ContainsKey(fromAgentID)) + { + // Local sim message + ScenePresence avatar = this.Avatars[fromAgentID]; + avatar.ControllingClient.SendInstantMessage(message, toAgentID); + } + else + { + // Message came from a user outside the sim, ignore? + } } else { -- cgit v1.1