Login MethodLogin Method*
*



Contents  *



Index  *Topic Contents
*Previous Topic: ListUsers Method
*Next Topic: QueryChannelProperty Method

Login Method

Logs a user on to the chat server.

Syntax

object.Login ServerName, Nickname[, UserName][, RealName][, Password][, SecurityPackages] 

Parameters

objectRequired. An object expression that evaluates to an MsChatPr control.
ServerNameRequired. A string expression that contains the server Name. Can optionally include the port number.
NicknameRequired. A string expression containing the user Nickname. Must be a valid IRC/IRCX user Nickname.
UserNameOptional. A string expression that contains the UserName. If empty or missing, the control uses the Microsoft® Windows® login name as the UserName.
RealNameOptional. A string expression containing the user's RealName. Can be empty or missing, in which case the Username is used as the RealName.
PasswordOptional. A string expression containing the user's password. If empty or missing, no password is used to log in to the server.
SecurityPackagesOptional. A string expression that contains the name of the security package.

If empty or missing, the first authentication package provided by the server is used. If the server doesn't provide an authentication package, an anonymous login is tried.

The SecurityPackages parameter is a list of authentication packages that are successively tried during login. The packages must be separated by a semicolon and can include the ANON (not case sensitive) keyword for anonymous logins.

IRC servers do not implement user authentication; all logins are anonymous.

Remarks

The Login method can be called at two different stages—when the control is in the csDisconnected state, or after calling the Connect method and the control is in the csConnected state.

In this last case the ServerName and optional port number given in Login have to be the same as in the Connect call. After reaching the csConnected state, the csLogging and csLogged states are achieved.

Examples

1. Use Connect and Login:

MsChatPr1.Connect "comicsrv1.microsoft.com"
MsChatPr1.Login "comicsrv1.microsoft.com", "JB",_
"JamesB", ,MsChatPr1.SecurityPackages 

2. Use Login alone:

MsChatPr1.Login "irc.mtv.com", "JB007", "JamesB", "James Bond", ,"ANON"
MsChatPr1.Login "irc.univ-lyon1.fr", "Arthur"
MsChatPr1.Login "chat.msn.com", "Norbert", , , ,"DPA;NTLM;ANON"

See Also

Connect, Disconnect