Delphi-Kylix
  Home arrow Delphi-Kylix arrow Building an IRC Client
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Building an IRC Client
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2007-01-22

    Table of Contents:
  • Building an IRC Client
  • Procedures
  • More Procedures
  • Sending Messages
  • Processing Server Commands

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building an IRC Client


    (Page 1 of 5 )

    If you have ever wanted to build your own IRC client, keep reading. In this third part of a three-part article series, you will learn how to build an IRC client in Delphi from scratch, with assistance from Indy. While not all possible commands will be implemented, you will learn enough to add to and modify the code as you see fit.

    IRC Client

    In the previous two articles we discussed what an IRC client is and how it works.  We also looked at the IRC protocol from the point of view of the RFC in which it is defined. Then we considered how we can implement such a client in Delphi and looked at what components we can use to fulfill that aim.  We then decided to use a component called idIRCClient with which to create a IRC client. In the last article we looked at how much of the protocol this component can implement and found that it implements most of the commands required to create a client application. In this article we are going to focus on creating an IRC client from scratch. 

    What you need

    To build this client I'm using Delphi 7 and indy version 10.1.5. I unfortunately don't know if this application will work on any other version of Delphi as I don't have access to those versions. So it will be up to you to test them. Your indy version will have to be the one I have or newer, because the versions are constantly updated and the implementations do not remain the same.

    The Application

    On the question of how many of the commands to implement to have a comfortably working client, I will implement as many of the commands as possible and also give pointers on how to implement others. The reason for this is that many IRC servers will accept and work comfortably with clients that have a minimal implementation and others won't. So in effect, the more commands you implement the more your client will be able to work with all kinds of IRC servers and networks. When you've finished writing your application, try to connect to as many IRC servers/networks as possible, because some will not accept you, and others will.

    Here is a quick summary of how a client works:

    • Default port is set to 6667.
    • You need a (unique) nick name to connect to a IRC network.
    • Some networks will require you to register, so you will need a username and password.
    • You need the name of the IRC network, i.e irc.ukchatterbox.com and the name of the channel, i.e #talkmore.

    Start up Delphi, create a new application, and drop the following components:

    • idIRCClient - available from the Indy Client tab
    • Three editboxes  - available from the Standard tab. These will be used to receive user info, such as the nickname.
    • Two memo components - available from the Standard tab. These will be used to both display and accept user input.
    • Three buttons (captions, Connect/Say something, and Join) - available from the Standard tab.
    •  Five tlabels - available from the Standard tab

    Arrange them so they look something like this:

    More Delphi-Kylix Articles
    More By Leidago


       · Nothing that others will say will get listed :), nor is the onChannelMessage event...
       · I've not had a chance to test the app with the latest version of the Indy. When i...
     

    DELPHI-KYLIX ARTICLES

    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT