diff options
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rwxr-xr-x | indra/newview/llmutelist.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 65ac11092c..1616660af0 100755 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -218,6 +218,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) if ((mute.mType == LLMute::AGENT) && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) { + LL_WARNS() << "Trying to mute a Linden; ignored" << LL_ENDL; LLNotifications::instance().add("MuteLinden", LLSD(), LLSD()); return FALSE; } @@ -226,6 +227,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) if (mute.mType == LLMute::AGENT && mute.mID == gAgent.getID()) { + LL_WARNS() << "Trying to self; ignored" << LL_ENDL; return FALSE; } @@ -256,6 +258,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) } else { + LL_INFOS() << "duplicate mute ignored" << LL_ENDL; // was duplicate return FALSE; } @@ -646,6 +649,22 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c return legacy_it != mLegacyMutes.end(); } +BOOL LLMuteList::isMuted(const std::string& username, U32 flags) const +{ + mute_set_t::const_iterator mute_iter = mMutes.begin(); + while(mute_iter != mMutes.end()) + { + // can't convert "leha.test" into "LeHa TesT" so username comparison is more reliable + if (mute_iter->mType == LLMute::AGENT + && LLCacheName::buildUsername(mute_iter->mName) == username) + { + return TRUE; + } + mute_iter++; + } + return FALSE; +} + //----------------------------------------------------------------------------- // requestFromServer() //----------------------------------------------------------------------------- |