diff options
author | Sadie Powell <sadie@witchery.services> | 2024-05-11 17:33:42 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-05-11 17:40:38 +0100 |
commit | 4008e64f26531383029cdb747b456d515d367ad6 (patch) | |
tree | dd76b234ef043f1594ae965c9812eae0eb1d2ae7 /src/nickcore.cpp | |
parent | 1cf5918574468c04c93f588b63b3531ea5768a89 (diff) |
Store when the account name was registered in the NickCore.
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r-- | src/nickcore.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp index 5629b00fd..64aa4f504 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -73,7 +73,9 @@ void NickCore::Serialize(Serialize::Data &data) const data["pass"] << this->pass; data["email"] << this->email; data["language"] << this->language; - data["lastmail"] << this->lastmail; + data.SetType("lastmail", Serialize::Data::DT_INT); data["lastmail"] << this->lastmail; + data.SetType("time_registered", Serialize::Data::DT_INT); data["time_registered"] << this->time_registered; + data["memomax"] << this->memos.memomax; for (const auto &ignore : this->memos.ignores) data["memoignores"] << ignore << " "; @@ -99,6 +101,7 @@ Serializable *NickCore::Unserialize(Serializable *obj, Serialize::Data &data) data["email"] >> nc->email; data["language"] >> nc->language; data["lastmail"] >> nc->lastmail; + data["time_registered"] >> nc->time_registered; data["memomax"] >> nc->memos.memomax; { Anope::string buf; @@ -206,14 +209,7 @@ uint64_t NickCore::GetId() if (this->id) return this->id; - NickAlias *na = NickAlias::Find(this->display); - if (!na) - { - Log(LOG_DEBUG) << "Unable to find the display NickAlias for NickCore: " << this->display; - return 0; - } - - Anope::string secretid = this->display + "\0" + Anope::ToString(na->time_registered); + Anope::string secretid = this->display + "\0" + Anope::ToString(this->time_registered); // Generate the account id. This should almost always only have one // iteration but in the rare case that we generate a duplicate id we try |