]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/u_listmode.h
Whoops, forgot some stuff for when GECOS was moved to position 10 in the UID command...
[user/henk/code/inspircd.git] / include / u_listmode.h
index baf7367450f39e1ec7ee4ac7f4243dcd0db44e7b..6b4fba8893b800547d0e8cff9f6494964c223d25 100644 (file)
 #include "wildcard.h"
 #include "inspircd.h"
 
-/* Updated to use the <banlist> config tag if it exists
- * Written by Om <omster@gmail.com>, December 2005.
- * Based on code previously written by Om - April 2005
- * Updated to new API July 8th 2006 by Brain
- * Originally based on m_chanprotect and m_silence
- */
-
 /** Get the time as a string
  */
 inline std::string stringtime()
@@ -174,6 +167,11 @@ class ListModeBase : public ModeHandler
                user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
        }
 
+       virtual void DisplayEmptyList(userrec* user, chanrec* channel)
+       {
+               user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
+       }
+
        /** Remove all instances of the mode from a channel.
         * See mode.h
         * @param channel The channel to remove all instances of the mode from
@@ -188,22 +186,21 @@ class ListModeBase : public ModeHandler
                        std::deque<std::string> stackresult;
                        const char* mode_junk[MAXMODES+2];
                        mode_junk[0] = channel->name;
-                       userrec* n = new userrec(ServerInstance);
-                       n->SetFd(FD_MAGIC_NUMBER);
+
                        for (modelist::iterator it = el->begin(); it != el->end(); it++)
                        {
                                modestack.Push(this->GetModeChar(), assign(it->mask));
                        }
+
                        while (modestack.GetStackedLine(stackresult))
                        {
                                for (size_t j = 0; j < stackresult.size(); j++)
                                {
                                        mode_junk[j+1] = stackresult[j].c_str();
                                }
-                               ServerInstance->SendMode(mode_junk, stackresult.size() + 1, n);         
-                       }
 
-                       delete n;
+                               ServerInstance->SendMode(mode_junk, stackresult.size() + 1, ServerInstance->FakeClient);                
+                       }
                }
        }