]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/listmode.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / listmode.cpp
index 555f75fa39caa6ded6e871c7215066b9fa294c70..fb76beab210cc4c8a00379e9083d644078d54b81 100644 (file)
@@ -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<std::string> 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)