diff options
Diffstat (limited to 'src/modes/cmode_k.cpp')
-rw-r--r-- | src/modes/cmode_k.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index 21b5d8464..194c0efcb 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -33,7 +33,7 @@ ModePair ModeChannelKey::ModeSet(User*, User*, Channel* channel, const std::stri } } -void ModeChannelKey::RemoveMode(Channel* channel) +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 @@ -43,12 +43,17 @@ void ModeChannelKey::RemoveMode(Channel* channel) if (channel->IsModeSet(this->GetModeChar())) { - sprintf(moderemove,"-%c",this->GetModeChar()); - ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient); + if (stack) + stack->Push(this->GetModeChar(), channel->key); + else + { + sprintf(moderemove,"-%c",this->GetModeChar()); + ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient); + } } } -void ModeChannelKey::RemoveMode(User*) +void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack) { } |