diff options
author | Glenn Glazer <coyot@lindenlab.com> | 2016-05-25 08:12:47 -0700 |
---|---|---|
committer | Glenn Glazer <coyot@lindenlab.com> | 2016-05-25 08:12:47 -0700 |
commit | 67438c67aba96fe51dd29eee52bd332286dd2130 (patch) | |
tree | 5c10eacc151dfedcf0afcccd97da045169d5d704 /indra/llmessage/llavatarname.cpp | |
parent | 9908fcf4ac43537728d1b34e30650735cfb36147 (diff) | |
parent | fb598cd380b38714abed554b8feacabfc55b2aaa (diff) |
pull from lynx
Diffstat (limited to 'indra/llmessage/llavatarname.cpp')
-rw-r--r-- | indra/llmessage/llavatarname.cpp | 23 |
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; } |