On Sat, Jun 15, 2002 at 04:39:32AM -0700, Cosmin Marcu wrote:
>       char pong_str[] = "\nPONG :";
[...]
>                       strcat(pong_str,token);

That's just wrong.  You didn't allocate enough memory for it and
just screw up your stack.

This really doesn't have anything to do with IRC or PING/PONG,
you need to learn to program.  The whole thing really looks ugly
if you ask me.

Also, why do you send that '\n' before it?  You should *end* the
line with \r\n.  Not send it in front of the line.  It should
also send both \r and \n, even if the IRC server is so nice to
only accept \n.


Kurt

Reply via email to