aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_hostchange.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-05-14 14:35:07 +0100
committerGravatar Sadie Powell2022-05-14 14:47:56 +0100
commit986d587ea4bba1e89fc241220621d0834464ea28 (patch)
tree3783ead7019d3c85d9a3a241887442c05cf56de9 /src/modules/m_hostchange.cpp
parentRemove the old account system. (diff)
Add the new account system.
This still relies on the old extensibles for now but we can change that later.
Diffstat (limited to 'src/modules/m_hostchange.cpp')
-rw-r--r--src/modules/m_hostchange.cpp5
1 files changed, 3 insertions, 2 deletions
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<UCHAR_MAX + 1> 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;