From 986d587ea4bba1e89fc241220621d0834464ea28 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 14 May 2022 14:35:07 +0100 Subject: Add the new account system. This still relies on the old extensibles for now but we can change that later. --- src/modules/m_hostchange.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/modules/m_hostchange.cpp') diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 5fe705766..00a665b17 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -126,6 +126,7 @@ class ModuleHostChange final : public Module { private: + Account::API accountapi; std::bitset hostmap; HostRules hostrules; @@ -144,6 +145,7 @@ private: public: ModuleHostChange() : Module(VF_VENDOR, "Allows the server administrator to define custom rules for applying hostnames to users.") + , accountapi(this) { } @@ -207,8 +209,7 @@ public: if (rule.GetAction() == HostRule::HCA_ADDACCOUNT) { // Retrieve the account name. - const AccountExtItem* accountext = GetAccountExtItem(); - const std::string* accountptr = accountext ? accountext->Get(user) : NULL; + const std::string* accountptr = accountapi ? accountapi->GetAccountName(user) : nullptr; if (!accountptr) continue; -- cgit v1.3.1-10-gc9f91