summaryrefslogtreecommitdiff
path: root/indra/llcommon/llavatarname.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-27 14:56:29 -0700
committerJames Cook <james@lindenlab.com>2010-05-27 14:56:29 -0700
commitc7a6a2e08f34b2cd21816a905c21e8017646001c (patch)
tree296ca43bd0267418649f0de8d2ee100e360736b0 /indra/llcommon/llavatarname.cpp
parent5250ac075a2bf2ce6712acdb908432229b110c1a (diff)
DEV-50013 Friendlier info if you can't change name due to time lockout
Reviewed with Leyla
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rw-r--r--indra/llcommon/llavatarname.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 6e0582f865..14dc41591b 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -46,6 +46,7 @@ static const std::string LEGACY_FIRST_NAME("legacy_first_name");
static const std::string LEGACY_LAST_NAME("legacy_last_name");
static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default");
static const std::string DISPLAY_NAME_EXPIRES("display_name_expires");
+static const std::string DISPLAY_NAME_NEXT_UPDATE("display_name_next_update");
LLAvatarName::LLAvatarName()
: mUsername(),
@@ -54,7 +55,8 @@ LLAvatarName::LLAvatarName()
mLegacyLastName(),
mIsDisplayNameDefault(false),
mIsDummy(false),
- mExpires(F64_MAX)
+ mExpires(F64_MAX),
+ mNextUpdate(0.0)
{ }
bool LLAvatarName::operator<(const LLAvatarName& rhs) const
@@ -74,6 +76,7 @@ LLSD LLAvatarName::asLLSD() const
sd[LEGACY_LAST_NAME] = mLegacyLastName;
sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault;
sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires);
+ sd[DISPLAY_NAME_NEXT_UPDATE] = LLDate(mNextUpdate);
return sd;
}
@@ -86,6 +89,8 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean();
LLDate expires = sd[DISPLAY_NAME_EXPIRES];
mExpires = expires.secondsSinceEpoch();
+ LLDate next_update = sd[DISPLAY_NAME_NEXT_UPDATE];
+ mNextUpdate = next_update.secondsSinceEpoch();
}
std::string LLAvatarName::getCompleteName() const