"Majdi S. Abbas" wrote:
>
> On Sat, Jun 15, 2002 at 04:39:32AM -0700, Cosmin Marcu wrote:
> > Hello.
> > I'm trying to make an IRC client in VC++ 6. I compiled
> > ircu with cygwin and is running under Win Me. My
> > client works perfectly on it but when I connect it to
> > undernet it quits when receives the PING message from
> > the server. This the function which sends PONG when
> > receives ping:
>
> I think this is a pretty broken way to do this,
> but if you're going to play string pointer games, why
> not just take your input PING, change the I to an O,
> and send it back from whence it came?
>
> IIRC, you'll get a numeric ping you have to
> return during negotiation, and a regular string ping
> thereafter.
>
> How does your parser work? Are you sure you
> should be looking for the end of the string (\0) or
> just the end of the line in this routine?
>
> --msa
>
> (yes, I'm baaaaaaaack)
Man. all those code.. is this client ever to become production? (like
mIRC etc) if so, write a decent parser before you do other things...
this parser would be a piece of code dedicated to breaking the string
into tokens, checking length, recognising the command, etc. look at the
parser of ircu for example; a client's parser doesnt have to differ too
much from a server's parser.