Add bool LLMuteList::isLinden(const LLUUID& id) for use in situations where the available name may be just display name, but there is a UUID available instead.

This commit is contained in:
Lirusaito
2013-02-12 20:43:10 -05:00
parent f95830fe23
commit 43bb5d6e39
4 changed files with 10 additions and 2 deletions

View File

@@ -885,7 +885,7 @@ void LLFloaterAvatarList::refreshAvatarList()
LLColor4 name_color = sDefaultListText;
//Lindens are always more Linden than your friend, make that take precedence
if(LLMuteList::getInstance()->isLinden(av_name))
if(LLMuteList::getInstance()->isLinden(av_id))
{
static const LLCachedControl<LLColor4> ascent_linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
name_color = ascent_linden_color;

View File

@@ -280,6 +280,13 @@ LLMuteList::~LLMuteList()
}
}
bool LLMuteList::isLinden(const LLUUID& id) const
{
std::string name;
gCacheName->getFullName(id, name);
return isLinden(name);
}
BOOL LLMuteList::isLinden(const std::string& name) const
{
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;

View File

@@ -116,6 +116,7 @@ public:
BOOL isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); };
BOOL isLinden(const std::string& name) const;
bool isLinden(const LLUUID& id) const;
BOOL isLoaded() const { return mIsLoaded; }

View File

@@ -409,7 +409,7 @@ void LLNetMap::draw()
avColor = it->second;
}
//Lindens are always more Linden than your friend, make that take precedence
else if(LLMuteList::getInstance()->isLinden(avName))
else if(LLMuteList::getInstance()->isLinden(id))
{
avColor = linden_color;
}