- irc::modestacker modestack(true);
- std::string letter_b("b");
- for(BanList::iterator b = targchan->bans.begin(); b != targchan->bans.end(); ++b)
- {
- modestack.Push('b', b->data);
- }
- std::vector<std::string> stackresult;
- std::vector<TranslateType> dummy;
- while (modestack.GetStackedLine(stackresult))
- {
- creator->ProtoSendMode(user, TYPE_CHANNEL, targchan, stackresult, dummy);
- stackresult.clear();
- }
+ // We know that the mode handler for bans is in the core and is derived from ListModeBase
+ ListModeBase* banlm = static_cast<ListModeBase*>(*ban);
+ banlm->DoSyncChannel(targchan, creator, user);
+
+ // Show other listmodes as well