diff options
| author | 2022-05-02 19:55:03 +0100 | |
|---|---|---|
| committer | 2022-05-02 19:55:03 +0100 | |
| commit | c4f1d27a29763d4bcf3fc56a8629b2d3d7fba05e (patch) | |
| tree | 5f38d3fcd9b448accd35a8c7c0e6e92725e6a129 /src/modules/m_services_account.cpp | |
| parent | Fix various Doxygen comment issues. (diff) | |
| parent | Fix using the obsolete curve method on mbedTLS 3+. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_services_account.cpp')
| -rw-r--r-- | src/modules/m_services_account.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 7475ad48d..2e2334c24 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -32,6 +32,7 @@ #include "modules/ctctags.h" #include "modules/extban.h" #include "modules/exemption.h" +#include "modules/who.h" #include "modules/whois.h" enum @@ -172,6 +173,7 @@ public: class ModuleServicesAccount final : public Module , public CTCTags::EventListener + , public Who::EventListener , public Whois::EventListener { private: @@ -191,6 +193,7 @@ public: ModuleServicesAccount() : Module(VF_VENDOR | VF_OPTCOMMON, "Adds various channel and user modes relating to services accounts.") , CTCTags::EventListener(this) + , Who::EventListener(this) , Whois::EventListener(this) , calleridapi(this) , exemptionprov(this) @@ -206,6 +209,19 @@ public: { } + + ModResult OnWhoLine(const Who::Request& request, LocalUser* source, User* user, Membership* memb, Numeric::Numeric& numeric) override + { + size_t flag_index; + if (!request.GetFieldIndex('f', flag_index)) + return MOD_RES_PASSTHRU; + + if (user->IsModeSet(userregmode)) + numeric.GetParams()[flag_index].push_back('r'); + + return MOD_RES_PASSTHRU; + } + /* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */ void OnWhois(Whois::Context& whois) override { |
