aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_services_account.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2017-11-12 20:53:24 +0000
committerGravatar Peter Powell2017-11-13 16:24:42 +0000
commit0fd2d50fcf1bcff107d6d185aad5d8e9245d4141 (patch)
treeac3552562673f593f1b94e0f13421213faaae7bb /src/modules/m_services_account.cpp
parentAdd the m_ircv3_sts module which implements the IRCv3 STS spec. (diff)
Only subclass Simple{Channel,User}ModeHandler when necessary.
Diffstat (limited to 'src/modules/m_services_account.cpp')
-rw-r--r--src/modules/m_services_account.cpp36
1 files changed, 8 insertions, 28 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 249ba35ce..f413a04d0 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -89,30 +89,6 @@ class User_r : public ModeHandler
}
};
-/** Channel mode +R - unidentified users cannot join
- */
-class AChannel_R : public SimpleChannelModeHandler
-{
- public:
- AChannel_R(Module* Creator) : SimpleChannelModeHandler(Creator, "reginvite", 'R') { }
-};
-
-/** User mode +R - unidentified users cannot message
- */
-class AUser_R : public SimpleUserModeHandler
-{
- public:
- AUser_R(Module* Creator) : SimpleUserModeHandler(Creator, "regdeaf", 'R') { }
-};
-
-/** Channel mode +M - unidentified users cannot message channel
- */
-class AChannel_M : public SimpleChannelModeHandler
-{
- public:
- AChannel_M(Module* Creator) : SimpleChannelModeHandler(Creator, "regmoderated", 'M') { }
-};
-
class AccountExtItemImpl : public AccountExtItem
{
Events::ModuleEventProvider eventprov;
@@ -155,9 +131,9 @@ class AccountExtItemImpl : public AccountExtItem
class ModuleServicesAccount : public Module, public Whois::EventListener
{
CheckExemption::EventProvider exemptionprov;
- AChannel_R m1;
- AChannel_M m2;
- AUser_R m3;
+ SimpleChannelModeHandler m1;
+ SimpleChannelModeHandler m2;
+ SimpleUserModeHandler m3;
Channel_r m4;
User_r m5;
AccountExtItemImpl accountname;
@@ -166,7 +142,11 @@ class ModuleServicesAccount : public Module, public Whois::EventListener
ModuleServicesAccount()
: Whois::EventListener(this)
, exemptionprov(this)
- , m1(this), m2(this), m3(this), m4(this), m5(this)
+ , m1(this, "reginvite", 'R')
+ , m2(this, "regmoderated", 'M')
+ , m3(this, "regdeaf", 'R')
+ , m4(this)
+ , m5(this)
, accountname(this)
, checking_ban(false)
{