CIRCDCCChat Prototype
Syntax
var object = new CIRCDCCChat(parent, user, port);
Arguments
| Argument | Summary |
|---|---|
| parent | |
| user | |
| port |
Remarks
Members
| Member | Summary |
|---|---|
| _getParams | |
| abort | Aborts the connection. |
| accept | Call to make this end accept DCC Chat with target user. |
| act | |
| ctcp | |
| decline | Call to make this end decline DCC Chat with target user. |
| disconnect | Call to close the connection. |
| dispatch | |
| display | Displays a DCC user/file transfer-centric message on the most appropriate view. |
| displayHere | |
| feedback | |
| getFontCSS | |
| getLCFunction | |
| getURL | |
| isActive | |
| onAbort | |
| onCTCP | |
| onCTCPAction | |
| onConnect | |
| onDataAvailable | |
| onDisconnect | |
| onFail | |
| onFindEnd | |
| onGotRequest | CIRCUser points the event here. |
| onInit | |
| onParsedData | |
| onPoll | |
| onPrivmsg | |
| onRawData | Raw data from DCC Chat stream. |
| onSocketAccepted | CBSConnection points the event here. |
| onStreamClose | |
| onStreamDataAvailable | |
| onUnknownCTCP | |
| performTabMatch | |
| request | Call to make this end request DCC Chat with targeted user. |
| say |
See Also
Source Code
function CIRCDCCChat(parent, user, port)
{
// user == CIRCDCCUser object.
// port == port as specified in CTCP DCC message.
this.READ_TIMEOUT = 50;
// Link up all our data.
this.parent = parent;
this.id = parent.getNextID();
this.eventPump = parent.parent.eventPump;
this.user = user;
this.localIP = this.parent.localIP;
this.remoteIP = user.remoteIP;
this.port = port;
this.unicodeName = user.unicodeName;
this.viewName = "DCC: " + user.unicodeName;
// Set up the initial state.
this.state = DCC_STATE_INIT;
this.dir = DCC_DIR_UNKNOWN;
this.requested = null;
this.connection = null;
this.savedLine = "";
this.state = new CIRCDCCState(parent, this, "dcc-chat");
this.parent.chats.push(this);
// Give ourselves a "me" object for the purposes of displaying stuff.
this.me = this.parent.addUser(this.user.netUser.parent.me, "0.0.0.0");
if ("onInit" in this)
this.onInit();
return this;
}