Browse Source

irc: fix multiple nicks in command /query (separated by commas): open one buffer per nick

master
Sebastien Helleu 9 years ago
parent
commit
c103c8d356
  1. 4
      ChangeLog
  2. 2
      doc/de/autogen/user/irc_commands.txt
  3. 2
      doc/en/autogen/user/irc_commands.txt
  4. 2
      doc/fr/autogen/user/irc_commands.txt
  5. 2
      doc/it/autogen/user/irc_commands.txt
  6. 2
      doc/ja/autogen/user/irc_commands.txt
  7. 5
      po/cs.po
  8. 5
      po/de.po
  9. 5
      po/es.po
  10. 8
      po/fr.po
  11. 4
      po/hu.po
  12. 5
      po/it.po
  13. 5
      po/ja.po
  14. 5
      po/pl.po
  15. 7
      po/pt_BR.po
  16. 4
      po/ru.po
  17. 4
      po/weechat.pot
  18. 75
      src/plugins/irc/irc-command.c

4
ChangeLog

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-dev, 2013-05-28
v0.4.2-dev, 2013-05-29
This document lists all changes for each version.
@ -20,6 +20,8 @@ Version 0.4.2 (under dev!) @@ -20,6 +20,8 @@ Version 0.4.2 (under dev!)
"layout_window"
* core: fix line alignment when option weechat.look.buffer_time_format is set
to empty string
* irc: fix multiple nicks in command /query (separated by commas): open one
buffer per nick
* xfer: fix compilation on OpenBSD (bug #39071)
Version 0.4.1 (2013-05-20)

2
doc/de/autogen/user/irc_commands.txt

@ -461,7 +461,7 @@ Daemon2: Nachricht an diesen Daemon weiterleiten @@ -461,7 +461,7 @@ Daemon2: Nachricht an diesen Daemon weiterleiten
[[command_irc_query]]
[command]*`query`* Eine private Nachricht an einen Nick schicken::
........................................
/query [-server <server>] <nick> [<text>]
/query [-server <server>] <nick>[,<nick>...] [<text>]
server: an diesen Server senden (interner Name)
nick: Nickname für privaten Chat

2
doc/en/autogen/user/irc_commands.txt

@ -461,7 +461,7 @@ daemon2: forward message to this daemon @@ -461,7 +461,7 @@ daemon2: forward message to this daemon
[[command_irc_query]]
[command]*`query`* send a private message to a nick::
........................................
/query [-server <server>] <nick> [<text>]
/query [-server <server>] <nick>[,<nick>...] [<text>]
server: send to this server (internal name)
nick: nick for private conversation

2
doc/fr/autogen/user/irc_commands.txt

@ -461,7 +461,7 @@ démon2: faire suivre le message à ce démon @@ -461,7 +461,7 @@ démon2: faire suivre le message à ce démon
[[command_irc_query]]
[command]*`query`* envoyer un message privé à un pseudo::
........................................
/query [-server <serveur>] <pseudo> [<texte>]
/query [-server <serveur>] <pseudo>[,<pseudo>...] [<texte>]
serveur: envoyer à ce serveur (nom interne)
pseudo: pseudo pour la conversation privée

2
doc/it/autogen/user/irc_commands.txt

@ -461,7 +461,7 @@ demone2: reindirizza messaggio a questo demone @@ -461,7 +461,7 @@ demone2: reindirizza messaggio a questo demone
[[command_irc_query]]
[command]*`query`* invia un messaggio privato ad un nick::
........................................
/query [-server <server>] <nick> [<testo>]
/query [-server <server>] <nick>[,<nick>...] [<text>]
server: invia a questo server (nome interno)
nick: nick per la conversazione privata

2
doc/ja/autogen/user/irc_commands.txt

@ -461,7 +461,7 @@ daemon2: メッセージをデーモンに転送 @@ -461,7 +461,7 @@ daemon2: メッセージをデーモンに転送
[[command_irc_query]]
[command]*`query`* ニックネーム宛にプライベートメッセージを送信::
........................................
/query [-server <server>] <nick> [<text>]
/query [-server <server>] <nick>[,<nick>...] [<text>]
server: 送信先サーバ (内部サーバ名)
nick: プライベート会話を行うニックネーム

5
po/cs.po

@ -20,7 +20,7 @@ msgid "" @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5207,7 +5207,8 @@ msgstr "" @@ -5207,7 +5207,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "poslat soukromou zprávu přezdívce"
msgid "[-server <server>] <nick> [<text>]"
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <server>] <přezdívka> [<text>]"
msgid ""

5
po/de.po

@ -22,7 +22,7 @@ msgid "" @@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@ -5730,7 +5730,8 @@ msgstr "" @@ -5730,7 +5730,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "Eine private Nachricht an einen Nick schicken"
msgid "[-server <server>] <nick> [<text>]"
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <server>] <nick> [<text>]"
msgid ""

5
po/es.po

@ -22,7 +22,7 @@ msgid "" @@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5416,7 +5416,8 @@ msgstr "" @@ -5416,7 +5416,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "enviar mensaje privado a un usuario"
msgid "[-server <server>] <nick> [<text>]"
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <servidor>] <apodo> [<texto>]"
msgid ""

8
po/fr.po

@ -21,8 +21,8 @@ msgid "" @@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"PO-Revision-Date: 2013-05-21 22:35+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-29 11:57+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -5581,8 +5581,8 @@ msgstr "" @@ -5581,8 +5581,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "envoyer un message privé à un pseudo"
msgid "[-server <server>] <nick> [<text>]"
msgstr "[-server <serveur>] <pseudo> [<texte>]"
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <serveur>] <pseudo>[,<pseudo>...] [<texte>]"
msgid ""
"server: send to this server (internal name)\n"

4
po/hu.po

@ -20,7 +20,7 @@ msgid "" @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4727,7 +4727,7 @@ msgid "send a private message to a nick" @@ -4727,7 +4727,7 @@ msgid "send a private message to a nick"
msgstr "személyes üzenet küldése egy felhasználónak"
#, fuzzy
msgid "[-server <server>] <nick> [<text>]"
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[szerver | név]"
#, fuzzy

5
po/it.po

@ -20,7 +20,7 @@ msgid "" @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5487,7 +5487,8 @@ msgstr "" @@ -5487,7 +5487,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "invia un messaggio privato ad un nick"
msgid "[-server <server>] <nick> [<text>]"
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <server>] <nick> [<testo>]"
msgid ""

5
po/ja.po

@ -20,7 +20,7 @@ msgid "" @@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@ -5389,7 +5389,8 @@ msgstr "" @@ -5389,7 +5389,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "ニックネーム宛にプライベートメッセージを送信"
msgid "[-server <server>] <nick> [<text>]"
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <server>] <nick> [<text>]"
msgid ""

5
po/pl.po

@ -21,7 +21,7 @@ msgid "" @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:54+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5498,7 +5498,8 @@ msgstr "" @@ -5498,7 +5498,8 @@ msgstr ""
msgid "send a private message to a nick"
msgstr "wysyła prywatną wiadomość do użytkownika"
msgid "[-server <server>] <nick> [<text>]"
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[-server <serwer>] <nick> [<tekst>]"
msgid ""

7
po/pt_BR.po

@ -21,7 +21,7 @@ msgid "" @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:55+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5036,8 +5036,9 @@ msgstr "" @@ -5036,8 +5036,9 @@ msgstr ""
msgid "send a private message to a nick"
msgstr ""
msgid "[-server <server>] <nick> [<text>]"
msgstr ""
#, fuzzy
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "<apelido> [<apelido>...]"
msgid ""
"server: send to this server (internal name)\n"

4
po/ru.po

@ -21,7 +21,7 @@ msgid "" @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-05-20 16:55+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4759,7 +4759,7 @@ msgid "send a private message to a nick" @@ -4759,7 +4759,7 @@ msgid "send a private message to a nick"
msgstr "отправить личное сообщение нику"
#, fuzzy
msgid "[-server <server>] <nick> [<text>]"
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr "[сервер | ник]"
#, fuzzy

4
po/weechat.pot

@ -21,7 +21,7 @@ msgid "" @@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-05-21 22:34+0200\n"
"POT-Creation-Date: 2013-05-29 11:55+0200\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4191,7 +4191,7 @@ msgstr "" @@ -4191,7 +4191,7 @@ msgstr ""
msgid "send a private message to a nick"
msgstr ""
msgid "[-server <server>] <nick> [<text>]"
msgid "[-server <server>] <nick>[,<nick>...] [<text>]"
msgstr ""
msgid ""

75
src/plugins/irc/irc-command.c

@ -3507,8 +3507,8 @@ int @@ -3507,8 +3507,8 @@ int
irc_command_query (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
char *string;
int arg_nick, arg_text;
char *string, **nicks;
int i, arg_nick, arg_text, num_nicks;
IRC_BUFFER_GET_SERVER_CHANNEL(buffer);
@ -3528,37 +3528,50 @@ irc_command_query (void *data, struct t_gui_buffer *buffer, int argc, @@ -3528,37 +3528,50 @@ irc_command_query (void *data, struct t_gui_buffer *buffer, int argc,
IRC_COMMAND_CHECK_SERVER("query", 1);
/* create private window if not already opened */
ptr_channel = irc_channel_search (ptr_server, argv[arg_nick]);
if (!ptr_channel)
nicks = weechat_string_split (argv[arg_nick], ",", 0, 0, &num_nicks);
if (nicks)
{
ptr_channel = irc_channel_new (ptr_server,
IRC_CHANNEL_TYPE_PRIVATE,
argv[arg_nick], 1, 0);
if (!ptr_channel)
for (i = 0; i < num_nicks; i++)
{
weechat_printf (ptr_server->buffer,
_("%s%s: cannot create new private "
"buffer \"%s\""),
weechat_prefix ("error"), IRC_PLUGIN_NAME,
argv[arg_nick]);
return WEECHAT_RC_OK;
}
}
weechat_buffer_set (ptr_channel->buffer, "display", "1");
/* create private window if not already opened */
ptr_channel = irc_channel_search (ptr_server, nicks[i]);
if (!ptr_channel)
{
ptr_channel = irc_channel_new (ptr_server,
IRC_CHANNEL_TYPE_PRIVATE,
nicks[i], 1, 0);
if (!ptr_channel)
{
weechat_printf (ptr_server->buffer,
_("%s%s: cannot create new private "
"buffer \"%s\""),
weechat_prefix ("error"), IRC_PLUGIN_NAME,
nicks[i]);
}
}
/* display text if given */
if (argv_eol[arg_text])
{
string = irc_color_decode (argv_eol[arg_text],
weechat_config_boolean (irc_config_network_colors_receive));
irc_input_user_message_display (ptr_channel->buffer, 0,
(string) ? string : argv_eol[arg_text]);
if (string)
free (string);
irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL,
"PRIVMSG %s :%s",
argv[arg_nick], argv_eol[arg_text]);
if (ptr_channel)
{
/* switch to buffer */
weechat_buffer_set (ptr_channel->buffer, "display", "1");
/* display text if given */
if (argv_eol[arg_text])
{
string = irc_color_decode (argv_eol[arg_text],
weechat_config_boolean (irc_config_network_colors_receive));
irc_input_user_message_display (ptr_channel->buffer, 0,
(string) ? string : argv_eol[arg_text]);
if (string)
free (string);
irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH,
NULL,
"PRIVMSG %s :%s",
nicks[i], argv_eol[arg_text]);
}
}
}
weechat_string_free_split (nicks);
}
}
else
@ -5948,7 +5961,7 @@ irc_command_init () @@ -5948,7 +5961,7 @@ irc_command_init ()
NULL, &irc_command_pong, NULL);
weechat_hook_command ("query",
N_("send a private message to a nick"),
N_("[-server <server>] <nick> [<text>]"),
N_("[-server <server>] <nick>[,<nick>...] [<text>]"),
N_("server: send to this server (internal name)\n"
" nick: nick for private conversation\n"
" text: text to send"),

Loading…
Cancel
Save