Bug 842183 - Land in comm-central Instantbird's changes to chat/ - 5 - Bio 1690 - /whois in a private irc conversation should support being parameterless, r=aleth.
This commit is contained in:
Родитель
ef1d738de6
Коммит
445515032e
|
@ -71,7 +71,7 @@ command.topic=%S [<new topic>]: Set this channel's topic.
|
|||
command.umode=%S (+|-)<new mode>: Set or unset a user mode.
|
||||
command.version=%S <nick>: Request the version of a user's client.
|
||||
command.voice=%S <nick1>[,<nick2>]*: Grant channel voice status to someone. You must be a channel operator to do this.
|
||||
command.whois=%S <nick>: Get information on a user.
|
||||
command.whois2=%S [<nick>]: Get information on a user.
|
||||
|
||||
# LOCALIZATION NOTE (message.*):
|
||||
# These are shown as system messages in the conversation.
|
||||
|
|
|
@ -361,12 +361,20 @@ var commands = [
|
|||
},
|
||||
{
|
||||
name: "whois",
|
||||
get helpString() _("command.whois", "whois"),
|
||||
get helpString() _("command.whois2", "whois"),
|
||||
run: function(aMsg, aConv) {
|
||||
// Note that this will automatically run whowas is the nick is offline.
|
||||
// Note that this will automatically run whowas if the nick is offline.
|
||||
aMsg = aMsg.trim();
|
||||
if (!aMsg || aMsg.contains(" "))
|
||||
// If multiple parameters are given, this is an error.
|
||||
if (aMsg.contains(" "))
|
||||
return false;
|
||||
// If the user does not provide a nick, but is in a private conversation,
|
||||
// assume the user is trying to whois the person they are talking to.
|
||||
if (!aMsg) {
|
||||
if (aConv.isChat)
|
||||
return false;
|
||||
aMsg = aConv.name;
|
||||
}
|
||||
getConv(aConv).requestBuddyInfo(aMsg);
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче