Internet Direct (Indy) Version 9.0.1 Beta
TIdIRCServer.OnCommandUser
Event handler for the IRC USER command.

property OnCommandUser: TIdIrcUserEvent;
Description
OnCommandUser is a TIdIrcUserEvent event handler that allows the server to respond to the IRC USER command. USER is used to specify the username, hostname, servername and realname of a new user. It is also used in communication between servers to indicate new user arriving on IRC, since only after both USER and NICK have been received from a client does a user become registered.

USER messages between IRC servers must to be prefixed with client's NICKname. Note that hostname and servername are normally ignored by the IRC server when the USER command comes from a directly connected client (for security reasons), but they are used in server to server communication. This means that a NICK must always be sent to a remote server when a new user is being introduced to the rest of the network before the accompanying USER is sent.

It must be noted that realname parameter must be the last parameter, because it may contain space characters and must be prefixed with a colon (':') to make sure this is recognized as such.

Since it is easy for a client to lie about its username by relying solely on the USER message, the use of an "Identity Server" is recommended. If the host which a user connects from has such a server enabled the username is set to that as in the reply from the "Identity Server".