Solved

Need help with IRC client

Posted on 1998-12-15
5
206 Views
Last Modified: 2010-04-04
Hey Everyone ... I'm trying to learn how to use the tclientsocket in delphi4 to write an irc client.. I've done a bit of research on client server communications, but I'm having this problem

I can connect to the server without a problem, I get the server text
NOTICE AUTH :*** Looking up your hostname...

NOTICE AUTH :*** Checking Ident
NOTICE AUTH :*** Found your hostname

NOTICE AUTH :*** No Ident response

at this time you send you NICK, and USER info .. when I do this I get no response from the server .. after about 10 seconds, it ping times me out ... I'm useing socket.sendtext('blahblah'); to send it info.. as far as i can find I'm sending the right text.. but the server will not rspond.. can someone help me out, let me know what I'm doign wrong... I would greatly appriciate it .. thanks alot

- Danny
0
Comment
Question by:ender42
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 1351229
 I think what you are doing is actually fine; the problem is that the irc server you are connecting to is trying to validate your login by calling an ident server on your system.  It's not actually asking your irc client to provide an identity (via NICK or USER).
  What you should perhaps do is look up the RFC on the ident protocol - or find a PC version of identd - and go from there.
0
 

Accepted Solution

by:
tjm4809 earned 100 total points
ID: 1351230
Mr. Williams is correct in that it is looking for an identd reply, not your NICK/USER information.  But, that is not what is ping timing you out.

In addition to wanting identd information, most IRC servers send you a PING message as soon as you connect, and every 60 seconds or so thereafter.  For most verions of ircd, you cannot begin to login until you respond to the first PING.  If you are watching what's coming into the TClientSocket, you'll see the PING message.  To respond to it, simply send back the same message the server sent you, replacing PING with PONG.

Next, you'll need to work on setting up an identd server, which is very simple to do.  You can find information on that in the RFC's.
0
 

Author Comment

by:ender42
ID: 1351231
Ok, I set up an identd server, and the irc server detects it.. everything looks fine.. it will not recognize the info i send it..

procedure TForm1.socketConnect(Sender: TObject; Socket: TCustomWinSocket);
begin
servertext.lines.add('Connected');
Socket.sendtext('NICK somenick');
Socket.sendtext('USER ender ansible irc.ais.net :Ender Wiggin');
end;

I've been useing that irc server to test... but I've tried many others...

Can someone please tell me if theres somethign wrong with that.. this is just so frustrating.. i don't undertand why it's not communicating correctly.. thanks

- Danny
0
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 1351232
 Have you checked the RFC for the irc protocol?
  What messages are you getting back from the server?  Any errors?
0
 

Author Comment

by:ender42
ID: 1351233
Ok, an update on this little saga... it was something very simple actually... when I was sending the string I was not sendign a cr-lf with it.. which is obviously required for it to register on the server ... so.. now it works fine, I'm logged in, and I'm working on all the other lovely parseing I must do... thanks again for the help guys...

- Danny
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question