CIRCServer.on001 Member

Successful login

Syntax

object.on001(e);

Arguments

ArgumentSummary
e

Returns

Remarks

See Also

Source Code

function serv_001 (e)
{
this.parent.connectAttempt = 0;
this.parent.connectCandidate = 0;
this.parent.state = NET_ONLINE;
// nextHost is incremented after picking a server. Push it back here.
this.parent.nextHost--;
/* servers won't send a nick change notification if user was forced
* to change nick while logging in (eg. nick already in use.) We need
* to verify here that what the server thinks our name is, matches what
* we think it is. If not, the server wins.
*/
if (e.params[1] != e.server.me.encodedName)
{
renameProperty(e.server.users, e.server.me.canonicalName,
this.toLowerCase(e.params[1]));
e.server.me.changeNick(toUnicode(e.params[1], this));
}
/* Set up supports defaults here.
* This is so that we don't waste /huge/ amounts of RAM for the network's
* servers just because we know about them. Until we connect, that is.
* These defaults are taken from the draft 005 RPL_ISUPPORTS here:
* http://www.ietf.org/internet-drafts/draft-brocklesby-irc-isupport-02.txt
*/
this.supports = new Object();
this.supports.modes = 3;
this.supports.maxchannels = 10;
this.supports.nicklen = 9;
this.supports.casemapping = "rfc1459";
this.supports.channellen = 200;
this.supports.chidlen = 5;
/* Make sure it's possible to tell if we've actually got a 005 message. */
this.supports.rpl_isupport = false;
this.channelTypes = [ '#', '&' ];
/* This next one isn't in the isupport draft, but instead is defaulting to
* the codes we understand. It should be noted, some servers include the
* mode characters (o, h, v) in the 'a' list, although the draft spec says
* they should be treated as type 'b'. Luckly, in practise this doesn't
* matter, since both 'a' and 'b' types always take a parameter in the
* MODE message, and parsing is not affected. */
this.channelModes = {
a: ['b'],
b: ['k'],
c: ['l'],
d: ['i', 'm', 'n', 'p', 's', 't']
};
// Default to support of v/+ and o/@ only.
this.userModes = [
{ mode: 'o', symbol: '@' },
{ mode: 'v', symbol: '+' }
];
// Assume the server supports no extra interesting commands.
this.servCmds = {};
if (this.parent.INITIAL_UMODE)
{
e.server.sendData("MODE " + e.server.me.encodedName + " :" +
this.parent.INITIAL_UMODE + "\n");
}
this.parent.users = this.users;
e.destObject = this.parent;
e.set = "network";
}