Bug 787433 - IRC component should return a proper CTCP VERSION response. r=aleth, florian
This commit is contained in:
Родитель
ee5ebd2479
Коммит
23d4626048
|
@ -33,7 +33,7 @@ ctcp.ping=Ping reply from %1$S in #2 second.;Ping reply from %1$S in #2 seconds.
|
|||
# LOCALIZATION NOTE (ctcp.version):
|
||||
# %1$S is the nickname of the user whose version was requested.
|
||||
# %2$S is the version response from the client.
|
||||
ctcp.version=%1$S is using "%2$S"
|
||||
ctcp.version=%1$S is using "%2$S".
|
||||
# LOCALIZATION NOTE (ctcp.time):
|
||||
# %1$S is the nickname of the user whose time was requested.
|
||||
# %2$S is the time response.
|
||||
|
|
|
@ -1120,7 +1120,7 @@ ircAccount.prototype = {
|
|||
username = this.getString("username");
|
||||
// But fallback to brandShortName if no username is provided (or is empty).
|
||||
if (!username)
|
||||
username = l10nHelper("chrome://branding/locale/brand.properties")("brandShortName");
|
||||
username = Services.appinfo.name;
|
||||
this.sendMessage("USER", [username, this._mode.toString(), "*",
|
||||
this._realname || this._requestedNickname]);
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@ const EXPORTED_SYMBOLS = ["ircCTCP", "ctcpBase"];
|
|||
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource:///modules/imServices.jsm");
|
||||
Cu.import("resource:///modules/imXPCOMUtils.jsm");
|
||||
Cu.import("resource:///modules/ircHandlers.jsm");
|
||||
Cu.import("resource:///modules/ircUtils.jsm");
|
||||
|
@ -224,9 +225,7 @@ var ctcpBase = {
|
|||
if (aMessage.command == "PRIVMSG") {
|
||||
// VERSION
|
||||
// Received VERSION request, send VERSION response.
|
||||
// Use brandShortName as the client version.
|
||||
let version =
|
||||
l10nHelper("chrome://branding/locale/brand.properties")("brandShortName");
|
||||
let version = Services.appinfo.name + " " + Services.appinfo.version;
|
||||
LOG("Received VERSION request from " + aMessage.nickname +
|
||||
". Sending VERSION response: \"" + version + "\".");
|
||||
this.sendCTCPMessage("VERSION", version, aMessage.nickname, true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче