+void ModeChannelBan::RemoveMode(Channel* channel, irc::modestacker* stack)
+{
+ BanList copy;
+
+ 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++)
+ {
+ if (stack)
+ {
+ stack->Push(this->GetModeChar(), i->data);
+ }
+ else
+ {
+ std::vector<std::string> parameters; parameters.push_back(channel->name); parameters.push_back("-b"); parameters.push_back(i->data);
+ ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
+ }
+ }
+}
+
+void ModeChannelBan::RemoveMode(User*, irc::modestacker* stack)
+{
+}
+
+void ModeChannelBan::DisplayList(User* user, Channel* channel)
+{
+ /* Display the channel banlist */
+ for (BanList::reverse_iterator i = channel->bans.rbegin(); i != channel->bans.rend(); ++i)
+ {
+ user->WriteServ("367 %s %s %s %s %lu",user->nick.c_str(), channel->name.c_str(), i->data.c_str(), i->set_by.c_str(), (unsigned long)i->set_time);
+ }
+ user->WriteServ("368 %s %s :End of channel ban list",user->nick.c_str(), channel->name.c_str());
+ return;
+}
+
+void ModeChannelBan::DisplayEmptyList(User* user, Channel* channel)
+{
+ user->WriteServ("368 %s %s :End of channel ban list",user->nick.c_str(), channel->name.c_str());
+}
+
+std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan, int)