CIRCNetwork.onUnknown Member

Syntax

object.onUnknown(e);

Arguments

ArgumentSummary
e

Returns

Remarks

See Also

Source Code

function my_unknown (e)
{
if ("pendingWhoisLines" in e.server)
{
/* whois lines always have the nick in param 2 */
e.user = new CIRCUser(e.server, null, e.params[2]);
e.destMethod = "onUnknownWhois";
e.destObject = this;
return;
}
e.params.shift(); /* remove the code */
e.params.shift(); /* and the dest. nick (always me) */
// Handle random IRC numerics automatically.
var msg = getMsg("msg.irc." + e.code, null, "");
if (msg)
{
if (arrayIndexOf(e.server.channelTypes, e.params[0][0]) != -1)
{
// Message about a channel (e.g. join failed).
e.channel = new CIRCChannel(e.server, null, e.params[0]);
}
var targetDisplayObj = this;
if (e.channel && ("messages" in e.channel))
targetDisplayObj = e.channel;
// Check for /knock support for the +i message.
if (((e.code == 471) || (e.code == 473) || (e.code == 475)) &&
("knock" in e.server.servCmds))
{
var args = [msg, e.channel.unicodeName,
"knock " + e.channel.unicodeName];
msg = getMsg("msg.irc." + e.code + ".knock", args, "");
client.munger.getRule(".inline-buttons").enabled = true;
targetDisplayObj.display(msg);
client.munger.getRule(".inline-buttons").enabled = false;
}
else
{
targetDisplayObj.display(msg);
}
if (e.channel)
{
if (e.channel.busy)
{
e.channel.busy = false;
updateProgress();
}
}
else
{
// Network type error?
if (this.busy)
{
this.busy = false;
updateProgress();
}
}
return;
}
/* if it looks like some kind of "end of foo" code, and we don't
* already have a mapping for it, make one up */
var length = e.params.length;
if (!(e.code in client.responseCodeMap) &&
(e.params[length - 1].search (/^end of/i) != -1))
{
client.responseCodeMap[e.code] = "---";
}
this.display(toUnicode(e.params.join(" "), this), e.code.toUpperCase());
}