diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 23366feb2..ab3bc8fd6 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -33,6 +33,7 @@ Bug fixes:: * core: set max length to 4096 for /secure passphrase (issue #1323) * core: refilter only affected buffers on filter change (issue #1309, issue #1311) * fset: fix slow refresh of fset buffer during /reload (issue #1313) + * irc: display an error with /allchan -current or /allpv -current if the current buffer is not an irc buffer (issue #1325) * irc: fix update of channels modes with arguments when joining a channel (issue #1324) * irc: quote NICK command argument sent to the server (issue #1319) * php: fix memory leak in functions string_eval_expression, string_eval_path_home, key_bind, hook_process_hashtable, hook_hsignal_send, info_get_hashtable, hdata_update diff --git a/po/cs.po b/po/cs.po index 4cffabc4e..7c4182290 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-17 18:32+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -6074,6 +6074,13 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s: příkaz \"%s\" nemůže být spuštěn v irc bufferu (server nebo kanál)" + #, c-format msgid "%s: future away: %s" msgstr "%s: Budoucí zpráva o nepřítomnosit: %s" @@ -7662,8 +7669,10 @@ msgstr "" "vyhledávání)\n" " cíl: odpověď musí odpovídat této masce" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" "%s%s: příkaz \"%s\" nemůže být spuštěn v irc bufferu (server nebo kanál)" diff --git a/po/de.po b/po/de.po index bd1073d79..c4dc10a00 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -7488,6 +7488,14 @@ msgstr "" "%s%s: der Befehl /%s kann nicht ausgeführt werden, da der Channel Modus \"%s" "\" nicht vom Server unterstützt wird" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s: Der Befehl \"%s\" kann nur im IRC-Buffer ausgeführt werden (Server " +"oder Channel)" + #, c-format msgid "%s: future away: %s" msgstr "%s: künftige Abwesenheit: %s" @@ -9170,8 +9178,10 @@ msgstr "" "Suche)\n" "target: Antwort soll auf diese Suchmaske zutreffen" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" "%s%s: Der Befehl \"%s\" kann nur im IRC-Buffer ausgeführt werden (Server " "oder Channel)" diff --git a/po/es.po b/po/es.po index a8911f7ef..fe9a2017b 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -6288,6 +6288,14 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s: el comando \"%s\" debe ser ejecutado en un buffer irc (canal o " +"servidor)" + #, c-format msgid "%s: future away: %s" msgstr "%s: ausencia futura: %s" @@ -7907,8 +7915,10 @@ msgstr "" "negativo)\n" " objetivo: la respuesta debería coincidir con esta máscara" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" "%s%s: el comando \"%s\" debe ser ejecutado en un buffer irc (canal o " "servidor)" diff --git a/po/fr.po b/po/fr.po index 07b23a079..8675efb70 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" -"PO-Revision-Date: 2019-03-17 16:04+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" +"PO-Revision-Date: 2019-03-19 20:35+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -7329,6 +7329,14 @@ msgstr "" "%s%s : impossible d'exécuter la commande /%s, le mode de canal \"%s\" n'est " "pas supporté par le serveur" +#, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s : la commande \"%s\" avec l'option \"%s\" doit être exécutée sur un " +"tampon irc (serveur, canal ou privé)" + #, c-format msgid "%s: future away: %s" msgstr "%s : future absence : %s" @@ -8986,10 +8994,12 @@ msgstr "" " cible : la réponse doit correspondre à ce masque" #, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" -"%s%s : la commande \"%s\" doit être exécutée sur un tampon irc (serveur ou " -"canal)" +"%s%s : la commande \"%s\" doit être exécutée sur un tampon irc (serveur, " +"canal ou privé)" msgid "current IRC server" msgstr "serveur IRC courant" diff --git a/po/hu.po b/po/hu.po index f4c78ad00..739cbb2d7 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-02-28 20:18+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5607,6 +5607,12 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "%s \"%s\" parancs nem futtatható a szerverablakban\n" + #, fuzzy, c-format msgid "%s: future away: %s" msgstr "CTCP %sVERSION%s válasz %s%s%s felhasználótól: %s\n" @@ -7115,7 +7121,9 @@ msgstr "" " cél: a válasznak illeszkednie kell ehhez a feltételhez" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "%s \"%s\" parancs nem futtatható a szerverablakban\n" #, fuzzy diff --git a/po/it.po b/po/it.po index 447b05d17..27d0a2d24 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -6452,6 +6452,14 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s: il comando \"%s\" deve essere eseguito su un buffer IRC (server o " +"canale)" + #, c-format msgid "%s: future away: %s" msgstr "%s: prossima assenza: %s" @@ -8076,8 +8084,10 @@ msgstr "" "numero è negativo)\n" "destinazione: la risposta dovrebbe coincidere con la mask" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" "%s%s: il comando \"%s\" deve essere eseguito su un buffer IRC (server o " "canale)" diff --git a/po/ja.po b/po/ja.po index c616bbdb0..fd3a0a19d 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -7149,6 +7149,13 @@ msgstr "" "%s%s: nie można wykonać komendy /%s, atrybut kanału \"%s\" nie jest " "wspierany przez serwer" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s: komenda \"%s\" musi zostać wykonana w buforze irc (serwer lub kanał)" + #, c-format msgid "%s: future away: %s" msgstr "%s: przyszła nieobecność: %s" @@ -8784,8 +8791,10 @@ msgstr "" "ujemnych)\n" "cel: odpowiedź powinna pasować do maski" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" "%s%s: komenda \"%s\" musi zostać wykonana w buforze irc (serwer lub kanał)" diff --git a/po/pt.po b/po/pt.po index 297f4ebc5..62477346f 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -6819,6 +6819,13 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" +"%s%s: o comando \"%s\" deve ser executado num buffer irc (servidor ou canal)" + #, c-format msgid "%s: future away: %s" msgstr "%s: futuro ausente: %s" @@ -8464,8 +8471,10 @@ msgstr "" "negativo)\n" " destino: a resposta deve corresponder à máscara" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" "%s%s: o comando \"%s\" deve ser executado num buffer irc (servidor ou canal)" diff --git a/po/pt_BR.po b/po/pt_BR.po index a4c87dcc7..4dec50f03 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-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -6248,6 +6248,12 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "%s%s: não foi possível criar novo canal \"%s\"" + #, c-format msgid "%s: future away: %s" msgstr "" @@ -7541,9 +7547,11 @@ msgid "" "target: reply should match this mask" msgstr "" -#, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" -msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" +msgstr "%s%s: não foi possível criar novo canal \"%s\"" msgid "current IRC server" msgstr "servidor IRC atual" diff --git a/po/ru.po b/po/ru.po index 5e997bf84..24648c1ed 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -5644,6 +5644,12 @@ msgid "" "server" msgstr "" +#, fuzzy, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "%s \"%s\" команда может быть выполнена только в буфере сервера\n" + #, fuzzy, c-format msgid "%s: future away: %s" msgstr "Планирование статуса на %s%s%s: %s\n" @@ -7144,7 +7150,9 @@ msgstr "" " цель: фильтровать результаты по маске" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "%s \"%s\" команда может быть выполнена только в буфере сервера\n" #, fuzzy diff --git a/po/tr.po b/po/tr.po index fcc18996d..d443a2971 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2019-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -5177,6 +5177,12 @@ msgid "" "server" msgstr "" +#, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" + #, c-format msgid "%s: future away: %s" msgstr "" @@ -6473,7 +6479,9 @@ msgid "" msgstr "" #, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" msgid "current IRC server" diff --git a/po/weechat.pot b/po/weechat.pot index 48c7cf708..fe6491975 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-03-12 21:27+0100\n" +"POT-Creation-Date: 2019-03-19 20:34+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -5121,6 +5121,12 @@ msgid "" "server" msgstr "" +#, c-format +msgid "" +"%s%s: command \"%s\" with option \"%s\" must be executed on irc buffer " +"(server, channel or private)" +msgstr "" + #, c-format msgid "%s: future away: %s" msgstr "" @@ -6346,7 +6352,9 @@ msgid "" msgstr "" #, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +msgid "" +"%s%s: command \"%s\" must be executed on irc buffer (server, channel or " +"private)" msgstr "" msgid "current IRC server" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 4d8afbcb0..41a10a278 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -533,6 +533,16 @@ IRC_COMMAND_CALLBACK(allchan) { if (weechat_strcasecmp (argv[i], "-current") == 0) { + if (!ptr_server) + { + weechat_printf (NULL, + _("%s%s: command \"%s\" with option " + "\"%s\" must be executed on " + "irc buffer (server, channel or private)"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + "allchan", "-current"); + return WEECHAT_RC_OK; + } current_server = 1; ptr_command = argv_eol[i + 1]; } @@ -592,6 +602,16 @@ IRC_COMMAND_CALLBACK(allpv) { if (weechat_strcasecmp (argv[i], "-current") == 0) { + if (!ptr_server) + { + weechat_printf (NULL, + _("%s%s: command \"%s\" with option " + "\"%s\" must be executed on " + "irc buffer (server, channel or private)"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + "allpv", "-current"); + return WEECHAT_RC_OK; + } current_server = 1; ptr_command = argv_eol[i + 1]; } diff --git a/src/plugins/irc/irc-command.h b/src/plugins/irc/irc-command.h index fb24b39be..5d689e0c7 100644 --- a/src/plugins/irc/irc-command.h +++ b/src/plugins/irc/irc-command.h @@ -34,7 +34,7 @@ struct t_irc_channel; { \ weechat_printf (NULL, \ _("%s%s: command \"%s\" must be executed on " \ - "irc buffer (server or channel)"), \ + "irc buffer (server, channel or private)"), \ weechat_prefix ("error"), IRC_PLUGIN_NAME, \ __command); \ return WEECHAT_RC_OK; \