Solved

Need help with IRC client

Posted on 1998-12-15
5
202 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 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now