X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Flistmode.cpp;h=b7b1cbc51c2afc9f033414b3410bac3ed4efdf4c;hb=b954283ccc4253a6881513bbe7f743c39886d3b7;hp=555f75fa39caa6ded6e871c7215066b9fa294c70;hpb=98beba078bbc3138cea33d0b5b94cccffed84f2f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/listmode.cpp b/src/listmode.cpp index 555f75fa3..b7b1cbc51 100644 --- a/src/listmode.cpp +++ b/src/listmode.cpp @@ -45,40 +45,18 @@ void ListModeBase::DisplayEmptyList(User* user, Channel* channel) user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str()); } -void ListModeBase::RemoveMode(Channel* channel, irc::modestacker* stack) +void ListModeBase::RemoveMode(Channel* channel, irc::modestacker& stack) { ChanData* cd = extItem.get(channel); if (cd) { - irc::modestacker modestack(false); - for (ModeList::iterator it = cd->list.begin(); it != cd->list.end(); it++) { - if (stack) - stack->Push(this->GetModeChar(), it->mask); - else - modestack.Push(this->GetModeChar(), it->mask); - } - - if (stack) - return; - - std::vector stackresult; - stackresult.push_back(channel->name); - while (modestack.GetStackedLine(stackresult)) - { - ServerInstance->SendMode(stackresult, ServerInstance->FakeClient); - stackresult.clear(); - stackresult.push_back(channel->name); + stack.Push(this->GetModeChar(), it->mask); } } } -void ListModeBase::RemoveMode(User*, irc::modestacker* stack) -{ - /* Listmodes dont get set on users */ -} - void ListModeBase::DoRehash() { ConfigTagList tags = ServerInstance->Config->ConfTags(configtag);