?
Solved

Need help with IRC client

Posted on 1998-12-15
5
Medium Priority
?
212 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
  • 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 200 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

809 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