summaryrefslogtreecommitdiff
path: root/src/coremods/core_channel/core_channel.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-12-03 17:16:28 +0000
committerPeter Powell <petpow@saberuk.com>2017-12-10 12:38:45 +0000
commit98372c3cf2c1455e41c388d822876a4d146ae76d (patch)
treee1f3403a7f16fab366e0304da84d9c10daf1a20e /src/coremods/core_channel/core_channel.cpp
parent150258b1f110aad58c8882b76474a4ceb3b2ab97 (diff)
Extract RFC modes from the core to core_channel and core_user.
Diffstat (limited to 'src/coremods/core_channel/core_channel.cpp')
-rw-r--r--src/coremods/core_channel/core_channel.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp
index 3af809645..af71e2ced 100644
--- a/src/coremods/core_channel/core_channel.cpp
+++ b/src/coremods/core_channel/core_channel.cpp
@@ -30,6 +30,19 @@ class CoreModChannel : public Module, public CheckExemption::EventListener
CommandKick cmdkick;
CommandNames cmdnames;
CommandTopic cmdtopic;
+
+ ModeChannelBan banmode;
+ SimpleChannelModeHandler inviteonlymode;
+ ModeChannelKey keymode;
+ ModeChannelLimit limitmode;
+ SimpleChannelModeHandler moderatedmode;
+ SimpleChannelModeHandler noextmsgmode;
+ ModeChannelOp opmode;
+ SimpleChannelModeHandler privatemode;
+ SimpleChannelModeHandler secretmode;
+ SimpleChannelModeHandler topiclockmode;
+ ModeChannelVoice voicemode;
+
insp::flat_map<std::string, char> exemptions;
ModResult IsInvited(User* user, Channel* chan)
@@ -49,6 +62,17 @@ class CoreModChannel : public Module, public CheckExemption::EventListener
, cmdkick(this)
, cmdnames(this)
, cmdtopic(this)
+ , banmode(this)
+ , inviteonlymode(this, "inviteonly", 'i')
+ , keymode(this)
+ , limitmode(this)
+ , moderatedmode(this, "moderated", 'm')
+ , noextmsgmode(this, "noextmsg", 'n')
+ , opmode(this)
+ , privatemode(this, "private", 'p')
+ , secretmode(this, "secret", 's')
+ , topiclockmode(this, "topiclock", 't')
+ , voicemode(this)
{
}
@@ -80,6 +104,7 @@ class CoreModChannel : public Module, public CheckExemption::EventListener
exempts[restriction] = prefix;
}
exemptions.swap(exempts);
+ banmode.DoRehash();
}
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE