diff options
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rw-r--r-- | indra/llcommon/llavatarname.cpp | 15 |
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; +} |