]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/u_listmode.h
This should do the job, dont quote me on it.
[user/henk/code/inspircd.git] / include / u_listmode.h
index a7df014ed539811fa55fd9e75abfab0697ec62b9..cad52fc12c4c578a6deda9806afe91428a158dcd 100644 (file)
@@ -153,15 +153,15 @@ class ListModeBase : public ModeHandler
                {
                        for (modelist::reverse_iterator it = el->rbegin(); it != el->rend(); ++it)
                        {
-                               user->WriteNumeric(listnumeric, "%s %s %s %s %s", user->nick.c_str(), channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str());
+                               user->WriteNumeric(listnumeric, "%s %s %s %s %s", user->nick.c_str(), channel->name.c_str(), it->mask.c_str(), it->nick.c_str(), it->time.c_str());
                        }
                }
-               user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name, endofliststring.c_str());
+               user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str());
        }
 
        virtual void DisplayEmptyList(User* user, Channel* channel)
        {
-               user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name, endofliststring.c_str());
+               user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str());
        }
 
        /** Remove all instances of the mode from a channel.
@@ -174,7 +174,7 @@ class ListModeBase : public ModeHandler
                channel->GetExt(infokey, el);
                if (el)
                {
-                       irc::modestacker modestack(false);
+                       irc::modestacker modestack(ServerInstance, false);
                        std::deque<std::string> stackresult;
                        std::vector<std::string> mode_junk;
                        mode_junk.push_back(channel->name);
@@ -288,7 +288,7 @@ class ListModeBase : public ModeHandler
                                {
                                        // We have a pattern matching the channel...
                                        maxsize = el->size();
-                                       if (maxsize < it->limit)
+                                       if (IS_LOCAL(source) || (maxsize < it->limit))
                                        {
                                                /* Ok, it *could* be allowed, now give someone subclassing us
                                                 * a chance to validate the parameter.
@@ -323,7 +323,7 @@ class ListModeBase : public ModeHandler
                        /* List is full, give subclass a chance to send a custom message */
                        if (!TellListTooLong(source, channel, parameter))
                        {
-                               source->WriteNumeric(478, "%s %s %s :Channel ban/ignore list is full", source->nick.c_str(), channel->name, parameter.c_str());
+                               source->WriteNumeric(478, "%s %s %s :Channel ban/ignore list is full", source->nick.c_str(), channel->name.c_str(), parameter.c_str());
                        }
                        
                        parameter = "";
@@ -396,7 +396,7 @@ class ListModeBase : public ModeHandler
        {
                modelist* mlist;
                chan->GetExt(infokey, mlist);
-               irc::modestacker modestack(true);
+               irc::modestacker modestack(ServerInstance, true);
                std::deque<std::string> stackresult;
                if (mlist)
                {