diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-30 11:39:48 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-30 11:57:47 +0100 |
commit | 0802d9d3ffaae3b116fafa2b6a2fe2825eb6c75d (patch) | |
tree | 1260c79184bf59b9a9cda434c445a9a0db2f8210 /modules | |
parent | 8d3b8c08b37d7334dbdf385a591ce2319472ccb0 (diff) |
Reference accounts in the database by their id not their nick.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/nickserv/ns_ajoin.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/nickserv/ns_ajoin.cpp b/modules/nickserv/ns_ajoin.cpp index d60e30f07..c2e432f2e 100644 --- a/modules/nickserv/ns_ajoin.cpp +++ b/modules/nickserv/ns_ajoin.cpp @@ -55,7 +55,7 @@ struct AJoinEntryType final if (!aj->owner) return; - data.Store("owner", aj->owner->display); + data.Store("ownerid", aj->owner->GetId()); data.Store("channel", aj->channel); data.Store("key", aj->key); } @@ -63,10 +63,12 @@ struct AJoinEntryType final Serializable *Unserialize(Serializable *obj, Serialize::Data &sd) const override { Anope::string sowner; + uint64_t sownerid = 0; - sd["owner"] >> sowner; + sd["owner"] >> sowner; // Deprecated 2.0 field + sd["ownerid"] >> sownerid; - NickCore *nc = NickCore::Find(sowner); + auto *nc = sownerid ? NickCore::FindId(sownerid) : NickCore::Find(sowner); if (nc == NULL) return NULL; |