CIRCDCCChat.request Member

Call to make this end request DCC Chat with targeted user.

Syntax

object.request();

Returns

Remarks

See Also

Source Code

function dchat_request()
{
this.state.sendRequest();
this.localIP = this.parent.localIP;
this.connection = new CBSConnection();
if (!this.connection.listen(this.port, this))
{
this.state.failed();
return false;
}
this.port = this.connection.port;
// Send the CTCP DCC request via the net user (CIRCUser object).
var ipNumber;
var ipParts = this.localIP.match(/(\d+)\.(\d+)\.(\d+)\.(\d+)/);
if (ipParts)
ipNumber = Number(ipParts[1]) * 256 * 256 * 256 +
Number(ipParts[2]) * 256 * 256 +
Number(ipParts[3]) * 256 +
Number(ipParts[4]);
else
return false;
// What should we do here? Panic?
this.user.netUser.ctcp("DCC", "CHAT chat " + ipNumber + " " + this.port);
return true;
}