CIRCNetwork.on317 Member

whois idle time

Syntax

object.on317(e);

Arguments

ArgumentSummary
e

Returns

Remarks

See Also

Source Code

function my_whoisreply (e)
{
var text = "egads!";
var nick = e.params[2];
var lowerNick = this.primServ.toLowerCase(nick);
var user;
if (this.whoisList && (e.code != 318) && (lowerNick in this.whoisList))
this.whoisList[lowerNick] = true;
if (e.user)
{
user = e.user;
nick = user.unicodeName;
}
switch (Number(e.code))
{
case 311:
// Clear saved away message so it appears and can be reset.
if (e.user)
e.user.lastShownAwayMessage = "";
text = getMsg(MSG_WHOIS_NAME,
[nick, e.params[3], e.params[4],
e.decodeParam(6)]);
break;
case 319:
var ary = stringTrim(e.decodeParam(3)).split(" ");
text = getMsg(MSG_WHOIS_CHANNELS, [nick, arraySpeak(ary)]);
break;
case 312:
text = getMsg(MSG_WHOIS_SERVER,
[nick, e.params[3], e.params[4]]);
break;
case 317:
text = getMsg(MSG_WHOIS_IDLE,
[nick, formatDateOffset(Number(e.params[3])),
new Date(Number(e.params[4]) * 1000)]);
break;
case 318:
// If the user isn't here, then we sent a whowas in on401.
// Don't display the "end of whois" message.
if (this.whoisList && (lowerNick in this.whoisList) &&
!this.whoisList[lowerNick])
{
delete this.whoisList[lowerNick];
return;
}
if (this.whoisList)
delete this.whoisList[lowerNick];
text = getMsg(MSG_WHOIS_END, nick);
if (user)
user.updateHeader();
break;
case 330:
text = getMsg(MSG_FMT_LOGGED_ON, [e.decodeParam(2), e.params[3]]);
break;
default:
text = toUnicode(e.params.splice(2, e.params.length).join(" "),
this);
}
if (e.user)
e.user.display(text, e.code);
else
this.display(text, e.code);
}