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 /modules/hostserv | |
| parent | f80bdf06bace6d3e5c50ed982fe1c14451ae4518 (diff) | |
Avoid NickAlias lookups by storing a pointer in the NickCore.
Diffstat (limited to 'modules/hostserv')
| -rw-r--r-- | modules/hostserv/hostserv.cpp | 2 | ||||
| -rw-r--r-- | modules/hostserv/hs_off.cpp | 2 | ||||
| -rw-r--r-- | modules/hostserv/hs_on.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/hostserv/hostserv.cpp b/modules/hostserv/hostserv.cpp index 81257cf4f..39b49ec29 100644 --- a/modules/hostserv/hostserv.cpp +++ b/modules/hostserv/hostserv.cpp @@ -43,7 +43,7 @@ public: const NickAlias *na = NickAlias::Find(u->nick); if (!na || na->nc != u->Account() || !na->HasVHost()) - na = NickAlias::Find(u->Account()->display); + na = u->AccountNick(); if (!na || !na->HasVHost()) return; diff --git a/modules/hostserv/hs_off.cpp b/modules/hostserv/hs_off.cpp index 8689ff919..b5978582f 100644 --- a/modules/hostserv/hs_off.cpp +++ b/modules/hostserv/hs_off.cpp @@ -27,7 +27,7 @@ public: const NickAlias *na = NickAlias::Find(u->nick); if (!na || na->nc != u->Account() || !na->HasVHost()) - na = NickAlias::Find(u->Account()->display); + na = u->AccountNick(); if (!na || !na->HasVHost()) source.Reply(HOST_NOT_ASSIGNED); diff --git a/modules/hostserv/hs_on.cpp b/modules/hostserv/hs_on.cpp index d61975b0b..6d4904042 100644 --- a/modules/hostserv/hs_on.cpp +++ b/modules/hostserv/hs_on.cpp @@ -29,7 +29,7 @@ public: User *u = source.GetUser(); const NickAlias *na = NickAlias::Find(u->nick); if (!na || na->nc != u->Account() || !na->HasVHost()) - na = NickAlias::Find(u->Account()->display); + na = u->AccountNick(); if (na && u->Account() == na->nc && na->HasVHost()) { source.Reply(_("Your vhost of \002%s\002 is now activated."), na->GetVHostMask().c_str()); |
