Well, can someone tell me how to code a simple IRC Client?
In VB.Net please.
thank you
Printable View
Well, can someone tell me how to code a simple IRC Client?
In VB.Net please.
thank you
Have you looked at the System.Net.Sockets namespace? You'll probably end up using that so users can interact with each other. Have you ever built big applications before? Are you familiar with good object orientation? A project like this is a very advanced application to build. I know you said simple, but that really doesn't matter. To be an IRC application, you're going to need chat rooms and servers and communication within chatrooms. Even getting that to work is an extremely arduous undertaking. There isn't really anything simple about it. Have you looked at any open source IRC client projects? Maybe that can give you a better idea on how to undertake this. I've provided you with some links at the end of this post that may further assist you.
http://www.developerfusion.co.uk/show/2946/
http://csharp-source.net/open-source...s/smartirc4net
well I was able to create an IRC Client in VB6 and in Delphi
anyway, Im working with this
http://msdn2.microsoft.com/en-us/lib...2a(vs.71).aspx
but the code itself seems to have some problems :S
thanks for replying
What kind of problems are you having? We can help you here.
I'm glad to help :)Quote:
Originally Posted by perito
ok below is what ive done so far
could u check it out please?
for now I only want the btnConnect to work :)
Im having problems with Catch e As Exception
Variable e hides a variable in an enclosing block
and another problem is
how to place
txtMain.Text = bla bla in a Private Shared Sub??
The variable e is already declared in that event handler. You should not declare it again as you are hiding that EventArgs argument. I'll take a look at this and reupload it soon.Quote:
Originally Posted by perito
k thx
Alright, here you go. I changed a lot of things.
I better get a rep for this..
does anyone know the order of the commands i have to send to become connected?
like "USER bla bla" "NICK bla bla" "PONG...."????
That's a very broad question..
ok...
does anyone know how can I get the Nicknames in a chat room and put them in a listbox?
the code send by the server is so confusing I cant figure out a way to grab the nicknames :S
Are you even using the code I gave you? I spent a while working on that.
Also, as for your most recent question, you'd simply loop through each client currently in the room and add each of them to the listbox. A simple message sent to the server to list the users and a simple one sent back containing the users. Then you just add each one. You'd probably end up using the Split function of the String class.
Go to mirc.com and look around there... they have the rfc's that detail the server, client and many other protocols.... they are very useful. Also good luck cos it's a very hard task to complete - trust me i know :)
fromethius, I'm looking at your program, what do I have to put in the Port and Room textbox's?
When i change 1 line to the following:
client.BeginConnect("efnet.xs4all.nl", 6667, AddressOf ConnectCallback, client)
i get the following result:
NOTICE AUTH :*** Processing connection to efnet.xs4all.nl
NOTICE AUTH :*** Looking up your hostname...
NOTICE AUTH :*** Checking Ident
NOTICE AUTH :*** Found your hostname
NOTICE AUTH :*** No Ident response
ERROR :Closing Link: 127.0.0.1 (Connection timed out)
Looks like the IRC is waiting for a repsonse from my side .. what do i need to send?
Look at the attached file... it's the Client Protocol for IRC.
Basicly now you have to send a couple of messages but to get it to connect properly you must send the following:
Command: NICK
Parameters: <nickname>
Example: NICK Wiz
Description: Lets the server know what nickname you want to use.
Command: USER
Parameters: <user> <mode> <unused> <realname>
Example: USER guest 0 * :Ronnie Reagan
Description: Gives the server information about the client.
You'll also receive a continous PING message from the server accompanied by a string which needs to be returned to the server for initial connection aswell as continuous connection in the form of PONG and the accompanied string from the ping. The IRC protocol is quite indepth and alot bigger than people actually realise but good luck :)
works .. tnx alot
no problem :)