Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : IRC Server Question-indy 10.1.5(latest snapshot)
| Subject: | IRC Server Question-indy 10.1.5(latest snapshot) |
| Posted by: | "Frederick" (..@gmail.com) |
| Date: | 22 Oct 2006 16:48:06 |
I'm trying to implement a IRC Server with indy and have a couple of questions:
The RFC2813 states that:
"A server must have the following information about a Client:
Server to which the client is connected to
And a network wide unique name"
I have created a Context object to hold the data for the client:
TClientInfo = class(TIdContext)
public
Host: String;
Nick: String;
end;
The question is, is this the right way to go about doing this and if it is, where and when (basically what events) do i collect this host and nickname when using the idircserver component?
The RFC also states the following:
The server is also required to keep the following information about the users on a network:
a unique nickname with a maximum length of nine (9) characters
Name of the host that the user is running on
the username of the user on that host,
And the server to which the client is connected."
to keep this info, i created another object/class:
TUserInfo = class(TIdContext)
public
username: String;
Nickname: String;
hostname: String;
end;
The same questions as above, is this the right way to go about storing this info and when and where (basically what events) do i collect this information?
I ask this because when i came to the "CommandUser" event i did not know where to get all the info, such as UserName,
HostName, ServerName, RealName. I can collect the first three names(adding them to the classes i created above), but when do i collect the "RealName", which i think the client irc application has to connect with. Also, what is the CommandUser event meant to do, exactly? Should it be sending a message to the user that just registered?
Is something wrong with the code below, because it does not work. I want the status message to be displayed in the memo control on the server form, and it is not happening:
procedure TForm1.IdIRCServer1Status(ASender: TObject;
const AStatus: TIdStatus; const AStatusText: String);
begin
memo1.Lines.Add(AStatusText);
end;
Thanks