diff options
author | Peter Powell <petpow@saberuk.com> | 2017-12-03 17:16:28 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-12-10 12:38:45 +0000 |
commit | 98372c3cf2c1455e41c388d822876a4d146ae76d (patch) | |
tree | e1f3403a7f16fab366e0304da84d9c10daf1a20e /src/mode.cpp | |
parent | 150258b1f110aad58c8882b76474a4ceb3b2ab97 (diff) |
Extract RFC modes from the core to core_channel and core_user.
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 98b0f9854..e2129b55a 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -24,7 +24,6 @@ #include "inspircd.h" -#include "builtinmodes.h" ModeHandler::ModeHandler(Module* Creator, const std::string& Name, char modeletter, ParamSpec Params, ModeType type, Class mclass) : ServiceProvider(Creator, Name, SERVICE_MODE) @@ -894,53 +893,6 @@ void PrefixMode::RemoveMode(Channel* chan, Modes::ChangeList& changelist) } } -struct builtin_modes -{ - SimpleChannelModeHandler s; - SimpleChannelModeHandler p; - SimpleChannelModeHandler m; - SimpleChannelModeHandler t; - - SimpleChannelModeHandler n; - SimpleChannelModeHandler i; - ModeChannelKey k; - ModeChannelLimit l; - - ModeChannelBan b; - ModeChannelOp o; - ModeChannelVoice v; - - 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, - &ui, &uo, &us }; - ServerInstance->Modules->AddServices(modes, sizeof(modes)/sizeof(ServiceProvider*)); - } -}; - -static builtin_modes static_modes; - -void ModeParser::InitBuiltinModes() -{ - static_modes.init(); - static_modes.b.DoRehash(); -} - bool ModeParser::IsModeChar(char chr) { return ((chr >= 'A' && chr <= 'Z') || (chr >= 'a' && chr <= 'z')); |