diff options
author | Sadie Powell <sadie@witchery.services> | 2024-06-03 15:51:29 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-06-03 16:04:53 +0100 |
commit | e71a9e289441fd78ffa1bd3d8c20ea2cb8542426 (patch) | |
tree | 95def1c721754ed095e2ca9654892343f611a953 /src/nickalias.cpp | |
parent | f80bdf06bace6d3e5c50ed982fe1c14451ae4518 (diff) |
Avoid NickAlias lookups by storing a pointer in the NickCore.
Diffstat (limited to 'src/nickalias.cpp')
-rw-r--r-- | src/nickalias.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nickalias.cpp b/src/nickalias.cpp index cfcd13381..f7c6a79e2 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -31,6 +31,8 @@ NickAlias::NickAlias(const Anope::string &nickname, NickCore *nickcore) throw CoreException("Empty nickcore passed to NickAlias constructor"); nickcore->aliases->push_back(this); + if (this->nick.equals_ci(nickcore->display)) + nickcore->na = this; if (!NickAliasList->insert_or_assign(this->nick, this).second) Log(LOG_DEBUG) << "Duplicate nick " << this->nick << " in NickAlias table"; |