diff options
Diffstat (limited to 'src/modes/cmode_b.cpp')
-rw-r--r-- | src/modes/cmode_b.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 1efb5d399..4eea2e44d 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -49,7 +49,7 @@ ModeAction ModeChannelBan::OnModeChange(User* source, User*, Channel* channel, s return MODEACTION_ALLOW; } -void ModeChannelBan::RemoveMode(Channel* channel) +void ModeChannelBan::RemoveMode(Channel* channel, irc::modestacker* stack) { BanList copy; char moderemove[MAXBUF]; @@ -61,13 +61,20 @@ void ModeChannelBan::RemoveMode(Channel* channel) for (BanList::iterator i = copy.begin(); i != copy.end(); i++) { - sprintf(moderemove,"-%c",this->GetModeChar()); - const char* parameters[] = { channel->name, moderemove, i->data }; - ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient); + if (stack) + { + stack->Push(this->GetModeChar(), i->data); + } + else + { + sprintf(moderemove,"-%c",this->GetModeChar()); + const char* parameters[] = { channel->name, moderemove, i->data }; + ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient); + } } } -void ModeChannelBan::RemoveMode(User*) +void ModeChannelBan::RemoveMode(User*, irc::modestacker* stack) { } |