CIRCUser.onDCCChat Member
Syntax
object.onDCCChat(e);
Arguments
Argument | Summary |
---|---|
e |
Returns
Remarks
See Also
Source Code
function my_dccchat(e)
{
if (!jsenv.HAS_SERVER_SOCKETS || !client.prefs["dcc.enabled"])
return;
var u = client.dcc.addUser(e.user, e.host);
var c = client.dcc.addChat(u, e.port);
var str = MSG_DCCCHAT_GOT_REQUEST;
var cmds = getMsg(MSG_DCC_COMMAND_ACCEPT, "dcc-accept " + c.id) + " " +
getMsg(MSG_DCC_COMMAND_DECLINE, "dcc-decline " + c.id);
var allowList = this.parent.parent.prefs["dcc.autoAccept.list"];
for (var m = 0; m < allowList.length; ++m)
{
if (hostmaskMatches(e.user, getHostmaskParts(allowList[m])))
{
var acceptDelay = client.prefs["dcc.autoAccept.delay"];
if (acceptDelay == 0)
{
str = MSG_DCCCHAT_ACCEPTING_NOW;
}
else
{
str = MSG_DCCCHAT_ACCEPTING;
cmds = [(acceptDelay / 1000), cmds];
}
setTimeout(onDCCAutoAcceptTimeout, acceptDelay, c);
break;
}
}
client.munger.getRule(".inline-buttons").enabled = true;
this.parent.parent.display(getMsg(str, c._getParams().concat(cmds)),
"DCC-CHAT");
client.munger.getRule(".inline-buttons").enabled = false;
// Pass the event over to the DCC Chat object.
e.set = "dcc-chat";
e.destObject = c;
e.destMethod = "onGotRequest";
}