aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_account.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-07-17 21:39:42 +0100
committerGravatar Sadie Powell2026-03-18 23:36:07 +0000
commit2db04920546dc82ef17b6cce9b873f2329348984 (patch)
treeb0447e5acd3b364a6041d02357f9207c98b6aea8 /src/modules/m_account.cpp
parentBackport the fix of copying dynamic references from git master. (diff)
Implement support for the IRCv3 ACCOUNTEXTBAN isupport token.
Diffstat (limited to 'src/modules/m_account.cpp')
-rw-r--r--src/modules/m_account.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/m_account.cpp b/src/modules/m_account.cpp
index c8952dc57..4f6e44454 100644
--- a/src/modules/m_account.cpp
+++ b/src/modules/m_account.cpp
@@ -28,8 +28,9 @@
#include "modules/account.h"
#include "modules/callerid.h"
#include "modules/ctctags.h"
-#include "modules/extban.h"
#include "modules/exemption.h"
+#include "modules/extban.h"
+#include "modules/isupport.h"
#include "modules/who.h"
#include "modules/whois.h"
@@ -179,6 +180,7 @@ public:
class ModuleAccount final
: public Module
, public CTCTags::EventListener
+ , public ISupport::EventListener
, public Who::EventListener
, public Whois::EventListener
{
@@ -196,6 +198,7 @@ public:
ModuleAccount()
: Module(VF_VENDOR | VF_OPTCOMMON, "Adds support for user accounts.")
, CTCTags::EventListener(this)
+ , ISupport::EventListener(this)
, Who::EventListener(this)
, Whois::EventListener(this)
, calleridapi(this)
@@ -209,6 +212,13 @@ public:
{
}
+ void OnBuildISupport(ISupport::TokenMap& tokens) override
+ {
+ tokens["ACCOUNTEXTBAN"] = accountextban.GetLetter()
+ ? INSP_FORMAT("{},{}", accountextban.GetName(), accountextban.GetLetter())
+ : accountextban.GetName();
+ }
+
ModResult OnWhoLine(const Who::Request& request, LocalUser* source, User* user, Membership* memb, Numeric::Numeric& numeric) override
{
size_t flag_index;