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.
avinationmerge
Melanie 2012-09-09 16:30:01 +02:00
parent d734c1985c
commit 0556bbefdd
2 changed files with 4 additions and 1 deletions

View File

@ -137,6 +137,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{ {
UUID toAgentID = new UUID(im.toAgentID); UUID toAgentID = new UUID(im.toAgentID);
if (toAgentID == UUID.Zero)
return;
// Try root avatar only first // Try root avatar only first
foreach (Scene scene in m_Scenes) foreach (Scene scene in m_Scenes)
{ {

View File

@ -3420,7 +3420,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llInstantMessage(string user, string message) public void llInstantMessage(string user, string message)
{ {
UUID result; 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"); ShoutError("An invalid key was passed to llInstantMessage");
ScriptSleep(2000); ScriptSleep(2000);