X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fm_names.c;h=157b7ee5abc33f7b362cdda3ad722467c183fb3b;hp=6c84d5079b8bae2e4655e90c55a67e8fce5f5e91;hb=25107247373df4aa75bddc2c2befd7c2dfadec6c;hpb=f2f202755d04c25b61e2b2a18a347e917acf1b9b diff --git a/ircd/m_names.c b/ircd/m_names.c index 6c84d50..157b7ee 100644 --- a/ircd/m_names.c +++ b/ircd/m_names.c @@ -285,6 +285,7 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (mlen + idx + NICKLEN + 3 > BUFSIZE) /* space, \r\n\0 */ { + buf[idx-1] = '\0'; send_reply(sptr, RPL_NAMREPLY, buf); strcpy(buf, "* * :"); idx = 5; @@ -292,7 +293,10 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) } } if (flag) + { + buf[idx-1] = '\0'; send_reply(sptr, RPL_NAMREPLY, buf); + } send_reply(sptr, RPL_ENDOFNAMES, "*"); } else if ((chptr = FindChannel(para)) != NULL)