summaryrefslogtreecommitdiff
path: root/indra/newview/llcallingcard.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-02-04 20:38:40 -0800
committerJames Cook <james@lindenlab.com>2010-02-04 20:38:40 -0800
commitc0b7c93c18783d6a426cf43265f34c86bdeceb4a (patch)
treebd7ece31856a0e4d54e6be0ace990930301ed9d3 /indra/newview/llcallingcard.cpp
parent88350edbcbec615f3b15fc82bd5ce4005621ac6f (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/llcallingcard.cpp')
-rw-r--r--indra/newview/llcallingcard.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index d988770f90..c4b7cee0d5 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -248,7 +248,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
using namespace std;
U32 new_buddy_count = 0;
- std::string first,last;
+ std::string full_name;
LLUUID agent_id;
for(buddy_map_t::const_iterator itr = buds.begin(); itr != buds.end(); ++itr)
{
@@ -258,7 +258,8 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
{
++new_buddy_count;
mBuddyInfo[agent_id] = (*itr).second;
- gCacheName->getName(agent_id, first, last);
+ // IDEVO JAMESDEBUG is this necessary? name is unused?
+ gCacheName->getFullName(agent_id, full_name);
addChangedMask(LLFriendObserver::ADD, agent_id);
lldebugs << "Added buddy " << agent_id
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
@@ -689,12 +690,11 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
setBuddyOnline(agent_id,online);
if(chat_notify)
{
- std::string first, last;
- if(gCacheName->getName(agent_id, first, last))
+ std::string full_name;
+ if(gCacheName->getFullName(agent_id, full_name))
{
notify = TRUE;
- args["FIRST"] = first;
- args["LAST"] = last;
+ args["NAME"] = full_name;
}
}
}
@@ -849,10 +849,8 @@ bool LLCollectProxyBuddies::operator()(const LLUUID& buddy_id, LLRelationship* b
bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
{
- gCacheName->getName(buddy_id, mFirst, mLast);
- std::ostringstream fullname;
- fullname << mFirst << " " << mLast;
- buddy_map_t::value_type value(fullname.str(), buddy_id);
+ gCacheName->getFullName(buddy_id, mFullName);
+ buddy_map_t::value_type value(mFullName, buddy_id);
if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION))
{
mMappable.insert(value);
@@ -862,10 +860,8 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
{
- gCacheName->getName(buddy_id, mFirst, mLast);
- std::ostringstream fullname;
- fullname << mFirst << " " << mLast;
- buddy_map_t::value_type value(fullname.str(), buddy_id);
+ gCacheName->getFullName(buddy_id, mFullName);
+ buddy_map_t::value_type value(mFullName, buddy_id);
if(buddy->isOnline())
{
mOnline.insert(value);
@@ -875,10 +871,8 @@ bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship*
bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
{
- gCacheName->getName(buddy_id, mFirst, mLast);
- std::ostringstream fullname;
- fullname << mFirst << " " << mLast;
- buddy_map_t::value_type value(fullname.str(), buddy_id);
+ gCacheName->getFullName(buddy_id, mFullName);
+ buddy_map_t::value_type value(mFullName, buddy_id);
if(buddy->isOnline())
{
mOnline.insert(value);
@@ -889,5 +883,3 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud
}
return true;
}
-
-