diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-02 23:53:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-02 23:53:29 +0000 |
commit | 57608fe351cff19679b1d78fb5cbfb7cad89dfc1 (patch) | |
tree | d88625afe327da2794cd34bd4d723d87df251cb7 /src/modes/cmode_k.cpp | |
parent | 80959555778404b7f0cdd4bd171ea7e1fe6116e9 (diff) |
Fixes for bug #493, tidyups to clearing of channel modes on losing FJOIN. Module unloads may also be tidied at a future date but it means reordering some loops in mode.cpp. See around the comment added.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9283 e03df62e-2008-0410-955e-edbf42e46eb7
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) { } |