summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-11-15 15:12:50 +0000
committerSadie Powell <sadie@witchery.services>2024-11-15 15:12:50 +0000
commitbc44195a3dc1dfa19cdb4621e0dddc3278277fa9 (patch)
tree09d8725b37a786f18df0fed6f87a220442ac793f /src
parenta7cbe2a139a6c4f0e8691fb7cc42f478d9f21938 (diff)
Make the account id map also use a checker.
Diffstat (limited to 'src')
-rw-r--r--src/nickcore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index 253f81c7a..38b2de223 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -16,7 +16,7 @@
#include <climits>
Serialize::Checker<nickcore_map> NickCoreList("NickCore");
-nickcoreid_map NickCoreIdList;
+Serialize::Checker<nickcoreid_map> NickCoreIdList("NickCore");
NickCore::NickCore(const Anope::string &coredisplay, uint64_t coreid)
: Serializable("NickCore")
@@ -32,7 +32,7 @@ NickCore::NickCore(const Anope::string &coredisplay, uint64_t coreid)
Log(LOG_DEBUG) << "Duplicate account " << this->display << " in NickCore table";
// Upgrading users may not have an account identifier.
- if (this->id && !NickCoreIdList.insert_or_assign(this->id, this).second)
+ if (this->id && !NickCoreIdList->insert_or_assign(this->id, this).second)
Log(LOG_DEBUG) << "Duplicate account id " << this->id << " in NickCore table";
FOREACH_MOD(OnNickCoreCreate, (this));
@@ -56,7 +56,7 @@ NickCore::~NickCore()
NickCoreList->erase(this->display);
if (this->id)
- NickCoreIdList.erase(this->id);
+ NickCoreIdList->erase(this->id);
if (!this->memos.memos->empty())
{
@@ -222,7 +222,7 @@ uint64_t NickCore::GetId()
{
const auto newidstr = this->display + "\0" + Anope::ToString(this->time_registered) + "\0" + Anope::ToString(attempt++);
const auto newid = Anope::hash_cs()(newidstr);
- if (NickCoreIdList.emplace(newid, this).second)
+ if (NickCoreIdList->emplace(newid, this).second)
{
this->id = newid;
this->QueueUpdate();