Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Re: IRC Server Question-indy 10.1.5(latest snapshot)

www.cryer.info
Managed Newsgroup Archive

Re: IRC Server Question-indy 10.1.5(latest snapshot)

Subject:Re: IRC Server Question-indy 10.1.5(latest snapshot)
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Sun, 22 Oct 2006 23:21:01

"Frederick" <FD@gmail.com> wrote in message
news:453c0336$1@newsgroups.borland.com...

> The RFC2813 states that:

RFC 2813 applies to IRC servers talking to each other.  It has nothing to do
with IRC clients talking to IRC servers.  That is covered by RFC 1459
instead.

> "A server must have the following information about a Client:

Your server needs to keep track of the clients that are connected to it, so
that it can forward that information to other servers when needed.

> Server to which the client is connected to

That is your own server.  It is the name of your server that other servers
can use to forward data packets to your server's clients from other networks
when needed.

> And a network wide unique name

The client sends its name to your server after it connects to your server.

> I have created a Context object to hold the data for the client:
<snip>
> The question is, is this the right way to go about doing this

That is part of it.  Did you assign your class to the server's ContextClass
property before activating the server?  If not, then you need to.

> if it is, where and when (basically what events) do i collect this host
> and nickname when using the idircserver component?

You already know the Host information.  It is your own server.  All you need
is the OnCommandNick and OnCommandUser events to get the client's
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.

The OnCommandUser event has individual parameters for all of those values:

    procedure TForm1.IdIRCServerCommandUser(AContext: TIdCommand; UserName,
HostName, ServerName, RealName: string);

> Also, what is the CommandUser event meant to do, exactly?

It is triggered in response to the USER command that a client sends to the
server.

> Should it be sending a message to the user that just registered?

Please read RFC 1459.

> Is something wrong with the code below, because it does not work.

Just saying that it does not work says nothing at all about the actual
problem you are having.  Please be more specific.


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive