aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_ircv3.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_ircv3.cpp
parentRemove the old account system. (diff)
downloadinspircd++-986d587ea4bba1e89fc241220621d0834464ea28.tar.gz
inspircd++-986d587ea4bba1e89fc241220621d0834464ea28.tar.bz2
inspircd++-986d587ea4bba1e89fc241220621d0834464ea28.zip
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_ircv3.cpp')
-rw-r--r--src/modules/m_ircv3.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp
index beefa24a4..ea3c157a6 100644
--- a/src/modules/m_ircv3.cpp
+++ b/src/modules/m_ircv3.cpp
@@ -51,6 +51,8 @@ public:
class JoinHook final
: public ClientProtocol::EventHook
{
+private:
+ Account::API accountapi;
ClientProtocol::Events::Join extendedjoinmsg;
public:
@@ -62,6 +64,7 @@ public:
JoinHook(Module* mod)
: ClientProtocol::EventHook(mod, "JOIN")
+ , accountapi(mod)
, asterisk(1, '*')
, awayprotoev(mod, "AWAY")
, extendedjoincap(mod, "extended-join")
@@ -79,10 +82,9 @@ public:
Membership* const memb = join.GetMember();
const std::string* account = &asterisk;
- const AccountExtItem* const accountext = GetAccountExtItem();
- if (accountext)
+ if (accountapi)
{
- const std::string* accountname = accountext->Get(memb->user);
+ const std::string* accountname = accountapi->GetAccountName(memb->user);
if (accountname)
account = accountname;
}
@@ -115,7 +117,7 @@ public:
class ModuleIRCv3 final
: public Module
- , public AccountEventListener
+ , public Account::EventListener
, public Away::EventListener
{
private:
@@ -126,7 +128,7 @@ private:
public:
ModuleIRCv3()
: Module(VF_VENDOR, "Provides the IRCv3 account-notify, away-notify, and extended-join client capabilities.")
- , AccountEventListener(this)
+ , Account::EventListener(this)
, Away::EventListener(this)
, cap_accountnotify(this, "account-notify")
, joinhook(this)