1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 14:43:14 +02:00

Add NickCore::FindId for finding an account by its id.

This commit is contained in:
Sadie Powell
2025-03-15 21:08:26 +00:00
parent 5ac5e1068e
commit 3b35199a53
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -236,6 +236,17 @@ NickCore *NickCore::Find(const Anope::string &nick)
return NULL;
}
NickCore *NickCore::FindId(uint64_t id)
{
auto it = NickCoreIdList->find(id);
if (it != NickCoreIdList->end())
{
it->second->QueueUpdate();
return it->second;
}
return nullptr;
}
uint64_t NickCore::GetId()
{
if (this->id)