diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-15 08:14:22 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-15 08:14:22 +0200 |
commit | b6c304ac87f0d40ab2a4ac3fac49b078cb9d77ea (patch) | |
tree | e3faa1447b95d7765d80a1cd8e44a1c8a0a256b6 | |
parent | 31d0742aed370dc77f143539c120bb403b8abd3f (diff) | |
download | weechat-b6c304ac87f0d40ab2a4ac3fac49b078cb9d77ea.zip |
irc: fix display of enabled/disabled client capabilities received in command CAP ACK (closes #151)
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | po/cs.po | 10 | ||||
-rw-r--r-- | po/de.po | 10 | ||||
-rw-r--r-- | po/es.po | 10 | ||||
-rw-r--r-- | po/fr.po | 12 | ||||
-rw-r--r-- | po/hu.po | 10 | ||||
-rw-r--r-- | po/it.po | 10 | ||||
-rw-r--r-- | po/ja.po | 10 | ||||
-rw-r--r-- | po/pl.po | 10 | ||||
-rw-r--r-- | po/pt.po | 10 | ||||
-rw-r--r-- | po/pt_BR.po | 10 | ||||
-rw-r--r-- | po/ru.po | 10 | ||||
-rw-r--r-- | po/tr.po | 10 | ||||
-rw-r--r-- | po/weechat.pot | 10 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 61 |
15 files changed, 169 insertions, 25 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 832fb2bd8..2a35cf730 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -26,6 +26,7 @@ Bug fixes:: * core: replace char "," by "~" in color codes to separate foreground from background (issue #1264) * alias: remove default aliases /AME and /AMSG (issue #1355) + * irc: fix display of enabled/disabled client capabilities received in command CAP ACK (issue #151) [[v2.5]] == Version 2.5 (2019-06-06) @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8938,10 +8938,18 @@ msgstr "%s%s: schopnost klienta, server podporuje: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: schopnost klienta, povoleno: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: schopnost klienta, povoleno: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: schopnost klienta, povoleno: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: schopnost klienta, povoleno: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: vlastnost klienta, odepřena: %s" @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-06-04 20:21+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <kde-i18n-de@kde.org>\n" @@ -10707,10 +10707,18 @@ msgstr "%s%s: Clientfähigkeiten, Server unterstützt: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: Clientfähigkeiten (CAP), aktuell aktiviert: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: Clientfähigkeit, aktiviert: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: Clientfähigkeit, aktiviert: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: Clientfähigkeit, aktiviert: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: Clientfähigkeit, abgewiesen: %s" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9252,10 +9252,18 @@ msgstr "%s%s: capabilidad del cliente, el servidor soporta: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: capabilidad del cliente, habilitado: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: capabilidad del cliente, habilitado: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: capabilidad del cliente, habilitado: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: capabilidad del cliente, habilitado: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: capabilidad del cliente, rechazada: %s" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" -"PO-Revision-Date: 2019-06-12 18:27+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" +"PO-Revision-Date: 2019-06-15 08:07+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -10462,10 +10462,18 @@ msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s : client capability, actuellement activé : %s" #, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s : client capability, activé : %s, désactivé : %s" + +#, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s : client capability, activé : %s" #, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s : client capability, désactivé : %s" + +#, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s : client capability, refusé : %s" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8347,11 +8347,19 @@ msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" msgid "%s%s: client capability, currently enabled: %s" msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "" #, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" + +#, fuzzy, c-format msgid "%s%s: client capability, refused: %s" msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:31+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9441,10 +9441,18 @@ msgstr "%s%s: capacità del client, il server supporta: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: capacità del client, abilitata: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: capacità del client, abilitata: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: capacità del client, abilitata: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: capacità del client, abilitata: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: capacità del client, rifiutata: %s" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-26 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -10057,10 +10057,18 @@ msgstr "%s%s: クライアントの機能、サーバは以下をサポート: % msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: クライアントの機能、現在有効化されているもの: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: クライアントの機能、有効化されたもの: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: クライアントの機能、有効化されたもの: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: クライアントの機能、有効化されたもの: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: クライアントの機能、拒否されたもの: %s" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-06-01 00:12+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -10225,10 +10225,18 @@ msgstr "%s%s: możliwości klienta, serwer wspiera: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: możliwości klienta, aktualnie włączone: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: możliwości klienta, włączone: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: możliwości klienta, włączone: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: możliwości klienta, włączone: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: możliwości klienta, odrzucone: %s" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -9896,10 +9896,18 @@ msgstr "%s%s: capacidade do cliente, o servidor suporta: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s%s: capacidade do cliente, ativado atualmente: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s%s: capacidade do cliente, ativado: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "%s%s: capacidade do cliente, ativado: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s%s: capacidade do cliente, ativado: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "%s%s: capacidade do cliente, recusado: %s" diff --git a/po/pt_BR.po b/po/pt_BR.po index 50c9346f9..8740881f5 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8776,10 +8776,18 @@ msgstr "%s: script removido: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s: script removido: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s: script removido: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s: script removido: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8383,11 +8383,19 @@ msgstr "Не могу записать лог-файл \"%s\"\n" msgid "%s%s: client capability, currently enabled: %s" msgstr "Не могу записать лог-файл \"%s\"\n" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "Не могу записать лог-файл \"%s\"\n" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "" #, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "Не могу записать лог-файл \"%s\"\n" + +#, fuzzy, c-format msgid "%s%s: client capability, refused: %s" msgstr "Не могу записать лог-файл \"%s\"\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2019-05-13 21:32+0200\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7577,10 +7577,18 @@ msgstr "%s: betik kaldırıldı: %s" msgid "%s%s: client capability, currently enabled: %s" msgstr "%s: betik kaldırıldı: %s" +#, fuzzy, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "%s: betik kaldırıldı: %s" + #, c-format msgid "%s%s: client capability, enabled: %s" msgstr "" +#, fuzzy, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "%s: betik kaldırıldı: %s" + #, c-format msgid "%s%s: client capability, refused: %s" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 07b6f54e7..a65359341 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-06-12 18:25+0200\n" +"POT-Creation-Date: 2019-06-15 08:06+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7441,10 +7441,18 @@ msgid "%s%s: client capability, currently enabled: %s" msgstr "" #, c-format +msgid "%s%s: client capability, enabled: %s, disabled: %s" +msgstr "" + +#, c-format msgid "%s%s: client capability, enabled: %s" msgstr "" #, c-format +msgid "%s%s: client capability, disabled: %s" +msgstr "" + +#, c-format msgid "%s%s: client capability, refused: %s" msgstr "" diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 4b13ac928..d9e160843 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -478,7 +478,7 @@ IRC_PROTOCOL_CALLBACK(cap) { char *ptr_caps, **caps_supported, **caps_added, **caps_removed; char **caps_enabled, *pos_value, *str_name, **str_caps; - char str_msg_auth[512]; + char str_msg_auth[512], **str_caps_enabled, **str_caps_disabled; int num_caps_supported, num_caps_added, num_caps_removed; int num_caps_enabled, sasl_to_do, sasl_mechanism; int i, timeout, last_reply; @@ -650,11 +650,11 @@ IRC_PROTOCOL_CALLBACK(cap) if (argc > 4) { ptr_caps = (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]; - weechat_printf_date_tags ( - server->buffer, date, NULL, - _("%s%s: client capability, enabled: %s"), - weechat_prefix ("network"), IRC_PLUGIN_NAME, ptr_caps); + sasl_to_do = 0; + str_caps_enabled = weechat_string_dyn_alloc (128); + str_caps_disabled = weechat_string_dyn_alloc (128); + caps_supported = weechat_string_split ( ptr_caps, " ", @@ -667,17 +667,56 @@ IRC_PROTOCOL_CALLBACK(cap) { for (i = 0; i < num_caps_supported; i++) { - weechat_hashtable_set (server->cap_list, - caps_supported[i], NULL); - - if (strcmp (caps_supported[i], "sasl") == 0) + if (caps_supported[i][0] == '-') { - sasl_to_do = 1; - break; + if (*str_caps_disabled[0]) + weechat_string_dyn_concat (str_caps_disabled, " "); + weechat_string_dyn_concat (str_caps_disabled, + caps_supported[i] + 1); + } + else + { + if (*str_caps_enabled[0]) + weechat_string_dyn_concat (str_caps_enabled, " "); + weechat_string_dyn_concat (str_caps_enabled, + caps_supported[i]); + + weechat_hashtable_set (server->cap_list, + caps_supported[i], NULL); + + if (strcmp (caps_supported[i], "sasl") == 0) + sasl_to_do = 1; } } weechat_string_free_split (caps_supported); } + if (*str_caps_enabled[0] && *str_caps_disabled[0]) + { + weechat_printf_date_tags ( + server->buffer, date, NULL, + _("%s%s: client capability, enabled: %s, disabled: %s"), + weechat_prefix ("network"), IRC_PLUGIN_NAME, + *str_caps_enabled, *str_caps_disabled); + } + else if (*str_caps_enabled[0]) + { + weechat_printf_date_tags ( + server->buffer, date, NULL, + _("%s%s: client capability, enabled: %s"), + weechat_prefix ("network"), IRC_PLUGIN_NAME, + *str_caps_enabled); + } + else if (*str_caps_disabled[0]) + { + weechat_printf_date_tags ( + server->buffer, date, NULL, + _("%s%s: client capability, disabled: %s"), + weechat_prefix ("network"), IRC_PLUGIN_NAME, + *str_caps_disabled); + } + weechat_string_dyn_free (str_caps_enabled, 1); + weechat_string_dyn_free (str_caps_disabled, 1); + if (sasl_to_do) { sasl_mechanism = IRC_SERVER_OPTION_INTEGER( |