зеркало из https://github.com/mozilla/pjs.git
Bug 410974 - Less display noise for auto-away
r=silver@warwickcompsoc.co.uk (James Ross) ChatZilla Only. NPOTFFB.
This commit is contained in:
Родитель
5eccf5ae08
Коммит
d35edc4919
|
@ -1234,6 +1234,7 @@ msg.mode.all = Mode for %S is %S"
|
|||
msg.mode.changed = Mode %S by %S"
|
||||
|
||||
msg.away.on = You are now marked as away (%S). Click the nickname button or use the |/back| command to return from being away.
|
||||
msg.idle.away.on = You have automatically been marked as away (%S) after %S minutes of inactivity.
|
||||
msg.away.off = You are no longer marked as away.
|
||||
msg.away.prompt = Enter an away message to use:
|
||||
msg.away.default = I'm not here right now.
|
||||
|
|
|
@ -2849,7 +2849,8 @@ function cmdAway(e)
|
|||
// user doesn't want to change nicks:
|
||||
if (awayNick && (normalNick != awayNick))
|
||||
e.server.changeNick(awayNick);
|
||||
e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) + "\n");
|
||||
e.server.sendData("AWAY :" + fromUnicode(e.reason, e.network) +
|
||||
"\n");
|
||||
}
|
||||
if (awayNick && (normalNick != awayNick))
|
||||
e.network.preferredNick = awayNick;
|
||||
|
@ -2860,10 +2861,20 @@ function cmdAway(e)
|
|||
// Client view, do command for all networks.
|
||||
sendToAllNetworks("away", e.reason);
|
||||
client.prefs["away"] = e.reason;
|
||||
if (("frame" in client) && client.frame)
|
||||
client.display(getMsg(MSG_AWAY_ON, e.reason));
|
||||
|
||||
// Don't tell people how to get back if they're idle:
|
||||
var idleMsgParams = [e.reason, client.prefs["awayIdleTime"]];
|
||||
if (e.command.name == "idle-away")
|
||||
var msg = getMsg(MSG_IDLE_AWAY_ON, idleMsgParams);
|
||||
else
|
||||
display(getMsg(MSG_AWAY_ON, e.reason));
|
||||
msg = getMsg(MSG_AWAY_ON, e.reason);
|
||||
|
||||
// Display on the *client* tab, or on the current tab iff
|
||||
// there's nowhere else they'll hear about it:
|
||||
if (("frame" in client) && client.frame)
|
||||
client.display(msg);
|
||||
else if (!client.getConnectedNetworks())
|
||||
display(msg);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2891,7 +2902,7 @@ function cmdAway(e)
|
|||
sendToAllNetworks("back");
|
||||
if (("frame" in client) && client.frame)
|
||||
client.display(MSG_AWAY_OFF);
|
||||
else
|
||||
else if (!client.getConnectedNetworks())
|
||||
display(MSG_AWAY_OFF);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ function onUnload()
|
|||
{
|
||||
dd("Shutting down ChatZilla.");
|
||||
uninitOfflineIcon();
|
||||
uninitIdleAutoAway(client.prefs["idleAutoAway"]);
|
||||
uninitIdleAutoAway(client.prefs["awayIdleTime"]);
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
@ -1284,7 +1284,11 @@ function my_305(e)
|
|||
CIRCNetwork.prototype.on306 =
|
||||
function my_306(e)
|
||||
{
|
||||
this.display(getMsg(MSG_AWAY_ON, this.prefs["away"]));
|
||||
var idleMsgParams = [this.prefs["away"], client.prefs["awayIdleTime"]];
|
||||
if (!this.isIdleAway)
|
||||
this.display(getMsg(MSG_AWAY_ON, this.prefs["away"]));
|
||||
else
|
||||
this.display(getMsg(MSG_IDLE_AWAY_ON, idleMsgParams));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче