aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_hostchange.cpp
diff options
context:
space:
mode:
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;