aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-05-01 14:25:02 +0100
committerGravatar Sadie Powell2022-05-01 14:25:02 +0100
commit97e1ad2daa459dcba248e5b3062046428ae2d253 (patch)
tree751ffce3c257435bcdc02a64a6d18b540ea7eb87 /src/modules
parentSync NSIS template with the one from CPack. (diff)
downloadinspircd++-97e1ad2daa459dcba248e5b3062046428ae2d253.tar.gz
inspircd++-97e1ad2daa459dcba248e5b3062046428ae2d253.tar.bz2
inspircd++-97e1ad2daa459dcba248e5b3062046428ae2d253.zip
Implement the 'r' (registered nick) WHO flag from UnrealIRCd.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_services_account.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 87bd5cf13..fa567ce94 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -31,6 +31,7 @@
#include "modules/callerid.h"
#include "modules/ctctags.h"
#include "modules/exemption.h"
+#include "modules/who.h"
#include "modules/whois.h"
enum
@@ -137,6 +138,7 @@ class AccountExtItemImpl : public AccountExtItem
class ModuleServicesAccount
: public Module
+ , public Who::EventListener
, public Whois::EventListener
, public CTCTags::EventListener
{
@@ -154,7 +156,8 @@ class ModuleServicesAccount
public:
ModuleServicesAccount()
- : Whois::EventListener(this)
+ : Who::EventListener(this)
+ , Whois::EventListener(this)
, CTCTags::EventListener(this)
, calleridapi(this)
, exemptionprov(this)
@@ -175,6 +178,18 @@ class ModuleServicesAccount
tokens["EXTBAN"].push_back('U');
}
+ ModResult OnWhoLine(const Who::Request& request, LocalUser* source, User* user, Membership* memb, Numeric::Numeric& numeric) CXX11_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) CXX11_OVERRIDE
{