From 0556bbefdda9643abf4bbba08ab8e3f066501b74 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 9 Sep 2012 16:30:01 +0200 Subject: Catch zero UUIDs in LSL and shout as an error. Also catch attempts to send IM to UUID.Zero because it ties up XMLRPC handlers needlessly. --- .../Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 3 +++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 1406aae..0c067d7 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -137,6 +137,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { UUID toAgentID = new UUID(im.toAgentID); + if (toAgentID == UUID.Zero) + return; + // Try root avatar only first foreach (Scene scene in m_Scenes) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d5e611c..f9b4bfd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3420,7 +3420,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llInstantMessage(string user, string message) { UUID result; - if (!UUID.TryParse(user, out result)) + if (!UUID.TryParse(user, out result) || result == UUID.Zero) { ShoutError("An invalid key was passed to llInstantMessage"); ScriptSleep(2000); -- cgit v1.1