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_passforward.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/modules/m_passforward.cpp') 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; -- cgit v1.3.1-10-gc9f91