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

Avoid NickAlias lookups by storing a pointer in the NickCore.

This commit is contained in:
Sadie Powell
2024-06-03 15:51:29 +01:00
parent f80bdf06ba
commit e71a9e2894
10 changed files with 22 additions and 7 deletions
+3 -1
View File
@@ -145,6 +145,8 @@ public:
/* Unsaved data */
/** The display nick for this account. */
NickAlias *na = nullptr;
/* Number of channels registered by this account */
uint16_t channelcount = 0;
/* Users online now logged into this account */
@@ -163,7 +165,7 @@ public:
/** Changes the display for this account
* @param na The new display, must be grouped to this account.
*/
void SetDisplay(const NickAlias *na);
void SetDisplay(NickAlias *na);
/** Checks whether this account is a services oper or not.
* @return True if this account is a services oper, false otherwise.
+5
View File
@@ -215,6 +215,11 @@ public:
*/
NickCore *Account() const;
/** Get the account nick the user is logged in using
* @return The account nick or NULL
*/
NickAlias *AccountNick() const;
/** Check if the user is identified for their nick
* @param check_nick True to check if the user is identified to the nickname they are on too
* @return true or false