aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_passforward.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_passforward.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_passforward.cpp')
-rw-r--r--src/modules/m_passforward.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp
index 76cdbf64c..f9046032c 100644
--- a/src/modules/m_passforward.cpp
+++ b/src/modules/m_passforward.cpp
@@ -29,11 +29,14 @@
class ModulePassForward final
: public Module
{
+private:
+ Account::API accountapi;
std::string nickrequired, forwardmsg, forwardcmd;
public:
ModulePassForward()
: Module(VF_VENDOR, "Allows an account password to be forwarded to a services pseudoclient such as NickServ.")
+ , accountapi(this)
{
}
@@ -90,8 +93,7 @@ public:
if (!user->GetClass()->config->getString("password").empty())
return;
- AccountExtItem* actext = GetAccountExtItem();
- if (actext && actext->Get(user))
+ if (accountapi && accountapi->GetAccountName(user))
{
// User is logged in already (probably via SASL) don't forward the password
return;