X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Flistmode.cpp;h=fb76beab210cc4c8a00379e9083d644078d54b81;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=555f75fa39caa6ded6e871c7215066b9fa294c70;hpb=98beba078bbc3138cea33d0b5b94cccffed84f2f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/listmode.cpp b/src/listmode.cpp index 555f75fa3..fb76beab2 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); @@ -115,8 +93,6 @@ void ListModeBase::DoImplements(Module* m) { ServerInstance->Modules->AddService(extItem); this->DoRehash(); - Implementation eventlist[] = { I_OnSyncChannel, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, m, sizeof(eventlist)/sizeof(Implementation)); } unsigned int ListModeBase::FindLimit(const std::string& channame)