Solved

Indy IRC

Posted on 2004-08-18
2
818 Views
Last Modified: 2012-08-13
Hi,

I'm trying to use the indy IRC component to create a simple chat client, but I'm having some weird problems.
I have this code:

procedure TForm1.IRCMessage(Sender: TObject; AUser: TIdIRCUser;
  AChannel: TIdIRCChannel; Content: String);
begin
      Display1.Lines.Add('--' + PansiChar(AUser) + ': ' + Content); // Display1 is a memo
end;

Using that, this is what I get when some says something on the channel I have it join:
--? G: Test
Every nickname is replaced by something like that. I tried using String(AUser) and AnsiString(AUser) too, but they have the same results. I also looked at the indy demos, and I didn't find any examples for the IRC Component, so any help is appreciated.

Thanks,
- MelchaS
0
Comment
Question by:MelchaS
2 Comments
 
LVL 3

Accepted Solution

by:
Tyrsis earned 40 total points
ID: 11835229
Hello,

This is because AUser : TIdIRCUser is a class, not a string.  You can solve this problem by doing the following:

Display1.Lines.Add('--' + AUser.Nick + ': ' + Content);

Hope this helps.

Tyrsis
0
 

Author Comment

by:MelchaS
ID: 11838646
That works, thanks a lot.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

912 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

19 Experts available now in Live!

Get 1:1 Help Now