diff options
author | James Cook <james@lindenlab.com> | 2010-02-04 20:38:40 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-04 20:38:40 -0800 |
commit | c0b7c93c18783d6a426cf43265f34c86bdeceb4a (patch) | |
tree | bd7ece31856a0e4d54e6be0ace990930301ed9d3 /indra/newview/llavataractions.cpp | |
parent | 88350edbcbec615f3b15fc82bd5ce4005621ac6f (diff) |
Converted all gCacheName->getName to getFullName for SLID compatibility
Also eliminated notification "ObjectGiveItemUnknownUser" because the
SLURL-based name lookup will always retrieve the user name.
Fixed a bug with ObjectGiveItem where the SLURL would be incorrect
for a group.
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index bfd3d12efb..7935c32d82 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -129,11 +129,10 @@ void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids) if(ids.size() == 1) { LLUUID agent_id = ids[0]; - std::string first, last; - if(gCacheName->getName(agent_id, first, last)) + std::string full_name; + if(gCacheName->getFullName(agent_id, full_name)) { - args["FIRST_NAME"] = first; - args["LAST_NAME"] = last; + args["NAME"] = full_name; } msgType = "RemoveFromFriends"; @@ -617,9 +616,9 @@ bool LLAvatarActions::isBlocked(const LLUUID& id) // static bool LLAvatarActions::canBlock(const LLUUID& id) { - std::string firstname, lastname; - gCacheName->getName(id, firstname, lastname); - bool is_linden = !LLStringUtil::compareStrings(lastname, "Linden"); + std::string full_name; + gCacheName->getFullName(id, full_name); + bool is_linden = (full_name.find("Linden") != std::string::npos); bool is_self = id == gAgentID; return !is_self && !is_linden; } |