CIRCUser Prototype

Syntax

var object = new CIRCUser(parent, unicodeName, encodedName, name, host);

Arguments

ArgumentSummary
parent
unicodeName
encodedName
name
host

Remarks

Members

MemberSummary
act
changeNick
ctcp
dispatch
display Displays a user-centric message on the most appropriate view.
displayHere
feedback
getBanMask
getFontCSS
getHostMask
getLCFunction
getURL Returns the IRC URL representation of this user.
notice
onCTCPAction
onDCCChat
onDCCReject
onDCCSend
onFindEnd
onInit
onNick
onNotice
onPrivmsg
onUnknownCTCP
performTabMatch
rehome
say
whois

See Also

Source Code

function CIRCUser(parent, unicodeName, encodedName, name, host)
{
// Both unicodeName and encodedName are optional, but at least one must be
// present.
if (!encodedName && !unicodeName)
throw "Hey! Come on, I need either an encoded or a Unicode name.";
if (!encodedName)
encodedName = fromUnicode(unicodeName, parent);
var canonicalName = parent.toLowerCase(encodedName);
if (canonicalName in parent.users)
{
var existingUser = parent.users[canonicalName];
if (name)
existingUser.name = name;
if (host)
existingUser.host = host;
return existingUser;
}
this.parent = parent;
this.encodedName = encodedName;
this.canonicalName = canonicalName;
this.unicodeName = unicodeName || toUnicode(encodedName, this.parent);
this.viewName = this.unicodeName;
this.name = name;
this.host = host;
this.desc = "";
this.connectionHost = null;
this.isAway = false;
this.modestr = this.parent.parent.INITIAL_UMODE;
this.parent.users[this.canonicalName] = this;
if ("onInit" in this)
this.onInit();
return this;
}