Author: beware (by Spike)
[ircu2.10.12-pk.git] / ircd / m_names.c
index 01df99181ae0892a2b33c05f5b0da1d5c71322df..02e80d2282789716c0268f46a7d0ff7d419b5687 100644 (file)
@@ -176,7 +176,7 @@ void do_names(struct Client* sptr, struct Channel* chptr, int filter)
       idx++;
     }
     strcat(buf, cli_name(c2ptr));
-    idx += strlen(cli_name(c2ptr)) + 1;
+    idx += strlen(cli_name(c2ptr));
     flag = 1;
     if (mlen + idx + NICKLEN + 5 > BUFSIZE)
       /* space, modifier, nick, \r \n \0 */
@@ -335,6 +335,7 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
        *  non secret channels.
        */ 
       do_names(sptr, chptr, NAMES_VIS);
+      send_reply(sptr, RPL_ENDOFNAMES, para);
     } 
   } else { /* Channel doesn't exist. */ 
       send_reply(sptr, RPL_ENDOFNAMES, para);