> When a user exits the network without a reason do not send "Quit: " send > "Quit" instead. > > State: tested and working.
As I read this patch, when the reason argument is not present, we use the client's nickname--but when the reason is present but zero length, we use "Quit". Is this the behavior you want? I'd tend to want to go for consistency. Also, it would be more efficient to test the first character for equivalency to zero--perhaps the BadPtr() macro would be useful to you. Finally, I prefer you use exit_client() rather than exit_client_msg() when you don't need the functionality--the former takes a string which is used verbatim, whereas the latter processes a format string, which we don't need to be doing too much of. (I could also suggest that you wrap stuff at 80 columns for readability...) > --- ircd/m_quit.c 2002/01/08 23:50:59 1.9.2.3 > +++ ircd/m_quit.c 2002/02/05 21:33:36 > @@ -111,8 +111,11 @@ > } > } > > - return exit_client_msg(cptr, sptr, sptr, "%s%s", parc > 1 ? "Quit: " : "", > - parc > 1 ? parv[parc - 1] : cli_name(cptr)); > + if (parc > 1) > + return exit_client_msg(cptr, sptr, sptr, "%s%s", (strlen(parv[parc - 1]) > 0) >? "Quit: " : "", > + (strlen(parv[parc - 1]) > 0) ? parv[parc - 1] : "Quit"); > + else > + return exit_client_msg(cptr, sptr, sptr, "%s", cli_name(cptr)); > } -- Kevin L. Mitchell <[EMAIL PROTECTED]>