CIRCServer.onCTCPReply Member

Syntax

object.onCTCPReply(e);

Arguments

ArgumentSummary
e

Returns

Remarks

See Also

Source Code

function serv_ctcpr (e)
{
var ary = e.params[2].match (/^\x01([^ ]+) ?(.*)\x01$/i);
if (ary == null)
return false;
e.CTCPData = ary[2] ? ary[2] : "";
e.CTCPCode = ary[1].toLowerCase();
e.type = "ctcp-reply-" + e.CTCPCode;
e.destMethod = "onCTCPReply" + ary[1][0].toUpperCase() +
ary[1].substr (1, ary[1].length).toLowerCase();
if (typeof this[e.destMethod] != "function")
{ /* if there's no place to land the event here, try to forward it */
e.destObject = this.parent;
e.set = "network";
if (typeof e.destObject[e.destMethod] != "function")
{ /* if there's no place to forward it, send it to unknownCTCP */
e.type = "unk-ctcp-reply";
e.destMethod = "onUnknownCTCPReply";
if (e.destMethod in this)
{
e.set = "server";
e.destObject = this;
}
else
{
e.set = "network";
e.destObject = this.parent;
}
}
}
else
e.destObject = this;
return true;
}