From 4cf2b9abe06996ea5ca1ee68d9008b3bd4d08dc1 Mon Sep 17 00:00:00 2001 From: Kakurady Date: Fri, 16 Oct 2009 13:55:54 -0400 Subject: Fix muting objects with same name as avatar mutes ScriptDialogs from avatar. ScriptDialogs from muted objects or groups will not be displayed either. --- linden/indra/newview/llviewermessage.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index c403e3e..eeef114 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -5479,18 +5479,32 @@ void process_script_dialog(LLMessageSystem* msg, void**) // Don't show lldialog boxes from muted avs -- McCabe std::string agent_name = first_name + " " + last_name; - if (!first_name.empty()) + if (!last_name.empty()) { std::vector mutes = LLMuteList::getInstance()->getMutes(); for (U32 i = 0; i < mutes.size(); i++) - { - if (mutes[i].mName == agent_name) + { + //this is almost like saying (mutes[i].mType != LLMute::Object), but more verbose ... -Kaku + if ( + ((mutes[i].mType == LLMute::AGENT) + && (mutes[i].mName == agent_name)) + || ((mutes[i].mType == LLMute::GROUP) + && (mutes[i].mName == last_name)) + || ((mutes[i].mType == LLMute::BY_NAME) + //don't mute groups by name in case a group has a last name as a group name. + && ((mutes[i].mName == agent_name))) + ) { delete info; return; } } } + // or Scriptdialog boxes from muted objects -- Kakurady + if (LLMuteList::getInstance()->isMuted(info->mObjectID, title)){ + delete info; + return; + } // unused for now LLUUID image_id; -- cgit v1.1