summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-08-06 13:27:16 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-08-06 13:27:16 +0200
commit00660293338f6a78278e52d05f6cf9a7ef9acc64 (patch)
treec26615335ba31d725a6edb8ae5814ef0157fa116 /src/mode.cpp
parent3e2cfaf8c0cda738033a877b3220cd9536601a2f (diff)
Remove a bunch of useless classes representing simple core modes
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 7deeb9b32..bd7adbd65 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -925,13 +925,13 @@ void PrefixMode::RemoveMode(Channel* chan, irc::modestacker& stack)
struct builtin_modes
{
- ModeChannelSecret s;
- ModeChannelPrivate p;
- ModeChannelModerated m;
- ModeChannelTopicOps t;
+ SimpleChannelModeHandler s;
+ SimpleChannelModeHandler p;
+ SimpleChannelModeHandler m;
+ SimpleChannelModeHandler t;
- ModeChannelNoExternal n;
- ModeChannelInviteOnly i;
+ SimpleChannelModeHandler n;
+ SimpleChannelModeHandler i;
ModeChannelKey k;
ModeChannelLimit l;
@@ -939,10 +939,21 @@ struct builtin_modes
ModeChannelOp o;
ModeChannelVoice v;
- ModeUserInvisible ui;
+ SimpleUserModeHandler ui;
ModeUserOperator uo;
ModeUserServerNoticeMask us;
+ builtin_modes()
+ : s(NULL, "secret", 's')
+ , p(NULL, "private", 'p')
+ , m(NULL, "moderated", 'm')
+ , t(NULL, "topiclock", 't')
+ , n(NULL, "noextmsg", 'n')
+ , i(NULL, "inviteonly", 'i')
+ , ui(NULL, "invisible", 'i')
+ {
+ }
+
void init()
{
ServiceProvider* modes[] = { &s, &p, &m, &t, &n, &i, &k, &l, &b, &o, &v,