IRC Protocol help

GfK

Suspended / Banned
Messages
1,503
Edit My Images
No
Ok, this is really doing my head in - to the point where I'm going to hit something very soon.... :banghead:

I'm trying to put together a basic IRC client. I've got as far as connecting to an IRC server but I'm totally confused thereafter. I've checked a couple of sites:

http://www.irchelp.org/irchelp/rfc/rfc2812.txt
http://www.no-hype.com/2006/02/12/understanding-the-irc-protocol/

...both of which seem to give completely different information on how to connect and more importantly STAY connected to an IRC server - neither actually seems to work. :hissyfit:

I haven't been able to get it to join a chatroom (by using the 'JOIN' command as is documented), but I think the problem lies somewhere within the 'USER' command. The two pages above give conflicting information about its syntax.

I'm opening a TCP stream and writing the following info to it:

USER GfK 0 * :GfK's TriviaBot
NICK GfK
JOIN #Chatroom
That gets it as far as connecting to an IRC server, but it will not join a chatroom, nor will it send private messages to other users connected to the server.

I also have a bit of code that parses and responds to PING requests - that part is working OK.

I'm not really sure where I'm going wrong.

Any of you technical people ever done anything like this before?

HELP!!
 
Can't help wondering if many people now even know what IRC is :)
Thought it was mainly for pirates these days... guess some people must still chat.

Is there no way to monitor the output of mIRC or other client to see what it sends out? Prob a dumb idea ;)

:) just noticed the triviabot reference - long time since I played with that sort of thing.
 
IRC is not just for pirates :p I'm on it everyday in Quakenet. Lots of people are there just to chat about photography and cars and things :)
 
Doh. Fixed it.

Nothing wrong with my grasp of protocol - my TCP stream was timing out and stopping the IRC server from responding.

:doh:
 
Back
Top