From 080f001f5587ea7ca745c6103978071ce6da0a3a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 23 Jul 2013 10:08:16 +0200 Subject: [PATCH] Make Linden detection more reliable and try to query LLAvatarNameCache first before falling back to old protocol as LLAvatarNameCache is the preferred method of retrieving avatar names --- indra/newview/fscommon.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index 728081cace..f5e295ac58 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -29,6 +29,7 @@ #include "fscommon.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llfloatersidepanelcontainer.h" #include "llnotificationmanager.h" #include "llinventorymodel.h" @@ -265,7 +266,16 @@ bool FSCommon::isLinden(const LLUUID& av_id) #endif std::string first_name, last_name; - gCacheName->getFirstLastName(av_id, first_name, last_name); + LLAvatarName av_name; + if (LLAvatarNameCache::get(av_id, &av_name)) + { + std::istringstream full_name(av_name.getUserName()); + full_name >> first_name >> last_name; + } + else + { + gCacheName->getFirstLastName(av_id, first_name, last_name); + } return (last_name == LL_LINDEN || last_name == LL_MOLE ||