CIRCChannel Prototype
Syntax
var object = new CIRCChannel(parent, unicodeName, encodedName);
Arguments
Argument | Summary |
---|---|
parent | |
unicodeName | |
encodedName |
Remarks
Members
Member | Summary |
---|---|
_clearUserList | |
_updateConferenceMode | |
act | |
addUser | |
ctcp | |
dispatch | |
display | Displays a channel-centric message on the most appropriate view. |
displayHere | |
feedback | |
findUsers | |
getFontCSS | |
getLCFunction | |
getURL | Returns the IRC URL representation of this channel. |
getUser | |
getUsersLength | |
iAmHalfOp | |
iAmOp | |
iAmVoice | |
invite | Invites a user to a channel. |
join | |
join | |
notice | |
on332 | TOPIC reply |
on333 | Topic setter information |
on348 | channel except stuff |
on349 | |
on353 | names reply |
on366 | end of names |
on367 | channel ban stuff |
on368 | |
on482 | |
onCTCPAction | |
onChanMode | |
onFindEnd | |
onInit | |
onJoin | |
onKick | |
onNick | |
onNotice | |
onPart | |
onPrivmsg | |
onQuit | |
onTopic | user changed topic |
onUnknownCTCP | |
part | |
part | |
performTabMatch | |
rehome | |
removeFromList | |
removeUser | |
say | |
setTopic |
See Also
Source Code
function CIRCChannel(parent, unicodeName, encodedName)
{
// 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.channels)
return parent.channels[canonicalName];
this.parent = parent;
this.encodedName = encodedName;
this.canonicalName = canonicalName;
this.unicodeName = unicodeName || toUnicode(encodedName, this);
this.viewName = this.unicodeName;
this.users = new Object();
this.bans = new Object();
this.excepts = new Object();
this.mode = new CIRCChanMode(this);
this.usersStable = true;
/* These next two flags represent a subtle difference in state:
* active - in the channel, from the server's point of view.
* joined - in the channel, from the user's point of view.
* e.g. parting the channel clears both, but being disconnected only
* clears |active| - the user still wants to be in the channel, even
* though they aren't physically able to until we've reconnected.
*/
this.active = false;
this.joined = false;
this.parent.channels[this.canonicalName] = this;
if ("onInit" in this)
this.onInit();
return this;
}