Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_list.c
index 6007f7e172d0b56e709ce0f0916d4ea63cb3d2ee..dc71963994cab1c49a7e72226cc65471740e179b 100644 (file)
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
+#include "config.h"
+
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
 #include "msg.h"
 #include "numeric.h"
 #include "numnicks.h"
+#include "s_bsd.h"
 #include "send.h"
 
 #include <assert.h>
@@ -285,6 +280,7 @@ int m_list(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     MyFree(cli_listing(sptr));
     cli_listing(sptr) = 0;
     send_reply(sptr, RPL_LISTEND);
+    update_write(sptr);
     if (parc < 2)
       return 0;                 /* Let LIST abort a listing. */
   }
@@ -295,7 +291,7 @@ int m_list(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     args = la_init; /* initialize argument to blank slate */
 
     for (param = 1; parv[param]; param++) { /* process each parameter */
-      switch (param_parse(sptr, parv[param], &args, parc != 2)) {
+      switch (param_parse(sptr, parv[param], &args, parc == 2)) {
       case LPARAM_ERROR: /* error encountered, usage already sent, return */
        return 0;
        break;