Results 1 to 18 of 18

Thread: [RESOLVED] [2008] Simple IRC Client

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Resolved [RESOLVED] [2008] Simple IRC Client

    Well, can someone tell me how to code a simple IRC Client?
    In VB.Net please.
    thank you

  2. #2
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Simple IRC Client

    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] Simple IRC Client

    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

  4. #4
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Simple IRC Client

    What kind of problems are you having? We can help you here.

    Quote Originally Posted by perito
    thanks for replying
    I'm glad to help

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] Simple IRC Client

    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??
    Attached Files Attached Files

  6. #6
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Simple IRC Client

    Quote Originally Posted by perito
    Variable e hides a variable in an enclosing block
    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.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] Simple IRC Client

    k thx

  8. #8
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Simple IRC Client

    Alright, here you go. I changed a lot of things.









    I better get a rep for this..
    Attached Files Attached Files

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] Simple IRC Client

    does anyone know the order of the commands i have to send to become connected?

    like "USER bla bla" "NICK bla bla" "PONG...."????

  10. #10
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Simple IRC Client

    That's a very broad question..

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    Re: [2008] Simple IRC Client

    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

  12. #12
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Simple IRC Client

    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.

  13. #13
    Addicted Member
    Join Date
    Jul 2007
    Posts
    159

    Re: [RESOLVED] [2008] Simple IRC Client

    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

  14. #14
    Lively Member
    Join Date
    Sep 2007
    Posts
    73

    Re: [RESOLVED] [2008] Simple IRC Client

    fromethius, I'm looking at your program, what do I have to put in the Port and Room textbox's?

  15. #15
    Hyperactive Member
    Join Date
    Jan 2008
    Posts
    267

    Re: [RESOLVED] [2008] Simple IRC Client

    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?

  16. #16
    Addicted Member
    Join Date
    Jul 2007
    Posts
    159

    Re: [RESOLVED] [2008] Simple IRC Client

    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
    Attached Files Attached Files

  17. #17
    Hyperactive Member
    Join Date
    Jan 2008
    Posts
    267

    Re: [RESOLVED] [2008] Simple IRC Client

    works .. tnx alot

  18. #18
    Addicted Member
    Join Date
    Jul 2007
    Posts
    159

    Re: [RESOLVED] [2008] Simple IRC Client

    no problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width