diff options
Diffstat (limited to 'src/modes/cmode_b.cpp')
-rw-r--r-- | src/modes/cmode_b.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 546bcb30f..9e2c777f0 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -37,6 +37,31 @@ ModeAction ModeChannelBan::OnModeChange(userrec* source, userrec* dest, chanrec* return MODEACTION_ALLOW; } +void ModeChannelBan::RemoveMode(chanrec* channel) +{ + BanList copy; + char moderemove[MAXBUF]; + userrec* n = new userrec(ServerInstance); + n->SetFd(FD_MAGIC_NUMBER); + + for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++) + { + copy.push_back(*i); + } + 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, n); + } + + delete n; +} + +void ModeChannelBan::RemoveMode(userrec* user) +{ +} + void ModeChannelBan::DisplayList(userrec* user, chanrec* channel) { /* Display the channel banlist */ |