summaryrefslogtreecommitdiff
path: root/indra/llcommon/llavatarname.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-12 16:30:57 -0700
committerJames Cook <james@lindenlab.com>2010-05-12 16:30:57 -0700
commit6b00537c871fb08f760016698c7e83f178c1cf55 (patch)
tree590e049324eb20195b664a4570d89a37929c30d4 /indra/llcommon/llavatarname.cpp
parentd36cffcb7b6b7eaed4e110dd1c92d0e397e7cfe6 (diff)
DEV-50013 WIP Added utility to get name and SLID in single string
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rw-r--r--indra/llcommon/llavatarname.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 4eeb6e706d..7415acadd4 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -79,3 +79,18 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
LLDate expires = sd[DISPLAY_NAME_EXPIRES];
mExpires = expires.secondsSinceEpoch();
}
+
+std::string LLAvatarName::getNameAndSLID() const
+{
+ std::string name;
+ if (!mSLID.empty())
+ {
+ name = mDisplayName + " (" + mSLID + ")";
+ }
+ else
+ {
+ // ...display names are off, legacy name is in mDisplayName
+ name = mDisplayName;
+ }
+ return name;
+}