summaryrefslogtreecommitdiff
path: root/indra/llmessage/llavatarname.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-05-04 11:31:00 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-05-04 11:31:00 +0300
commitb2fd39781833cf00c09d70704f13a8fa58428292 (patch)
tree20ccf6e42bac60a0700a439ee3796c7e9eb44881 /indra/llmessage/llavatarname.cpp
parent2b731af53af8a4836786be4265a59a108d637f9a (diff)
MAINT-6220 enable searching of the friend list with the classic username of the avatar.
Diffstat (limited to 'indra/llmessage/llavatarname.cpp')
-rw-r--r--indra/llmessage/llavatarname.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp
index d12f157910..d2115ee499 100644
--- a/indra/llmessage/llavatarname.cpp
+++ b/indra/llmessage/llavatarname.cpp
@@ -166,7 +166,7 @@ void LLAvatarName::setExpires(F64 expires)
mExpires = LLFrameTimer::getTotalSeconds() + expires;
}
-std::string LLAvatarName::getCompleteName() const
+std::string LLAvatarName::getCompleteName(bool use_parentheses) const
{
std::string name;
if (sUseDisplayNames)
@@ -182,7 +182,14 @@ std::string LLAvatarName::getCompleteName() const
name = mDisplayName;
if(sUseUsernames)
{
- name += " (" + mUsername + ")";
+ if(use_parentheses)
+ {
+ name += " (" + mUsername + ")";
+ }
+ else
+ {
+ name += " [ " + mUsername + " ]";
+ }
}
}
}
@@ -220,7 +227,7 @@ std::string LLAvatarName::getDisplayName() const
}
}
-std::string LLAvatarName::getUserName() const
+std::string LLAvatarName::getUserName(bool lowercase) const
{
std::string name;
if (mLegacyLastName.empty() || (mLegacyLastName == "Resident"))
@@ -238,7 +245,15 @@ std::string LLAvatarName::getUserName() const
}
else
{
- name = mLegacyFirstName + " " + mLegacyLastName;
+ if(lowercase)
+ {
+ name = mLegacyFirstName + "." + mLegacyLastName;
+ LLStringUtil::toLower(name);
+ }
+ else
+ {
+ name = mLegacyFirstName + " " + mLegacyLastName;
+ }
}
return name;
}