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
Solved

Indy IRC

Posted on 2004-08-18
2
821 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Working with hours 3 65
Delphi Yen format 3 45
Embarcadero C++ builder XE10.1 Berlin find In files dialogue stunted display 4 54
Twebbrowser add css to the header 3 28
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 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