diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-05-26 23:23:47 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-05-27 01:07:29 +0200 |
commit | 9bb24d3f458274b7485554bc95f1274900a69ec2 (patch) | |
tree | 33ab45d74813198ba1377eab83b6a9904a91801e /src/modes/cmode_k.cpp | |
parent | 244a65e8556328642350575c4a94ee8fc1b676b4 (diff) |
Deduplicate RemoveMode() implementations
The default (core) implementation can now remove prefix modes
The modestacker parameter is now mandatory
Diffstat (limited to 'src/modes/cmode_k.cpp')
-rw-r--r-- | src/modes/cmode_k.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index b2d9f34e8..850bc69db 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -30,29 +30,6 @@ ModeChannelKey::ModeChannelKey() : ModeHandler(NULL, "key", 'k', PARAM_ALWAYS, M { } -void ModeChannelKey::RemoveMode(Channel* channel, irc::modestacker* stack) -{ - /** +k needs a parameter when being removed, - * so we have a special-case RemoveMode here for it - */ - - if (channel->IsModeSet('k')) - { - if (stack) - { - stack->Push('k', channel->GetModeParameter('k')); - } - else - { - std::vector<std::string> parameters; - parameters.push_back(channel->name); - parameters.push_back("-k"); - parameters.push_back(channel->GetModeParameter('k')); - ServerInstance->SendMode(parameters, ServerInstance->FakeClient); - } - } -} - void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack) { } |