From 89b28e362c08e460c775ab8e6742a13604a06083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 12 Aug 2021 18:15:16 +0200 Subject: [PATCH] irc: add option "-parted" in command /allchan (closes #1685) --- ChangeLog.adoc | 1 + doc/de/includes/autogen_user_commands.de.adoc | 45 ++++++++++--------- doc/en/includes/autogen_user_commands.en.adoc | 7 ++- doc/fr/includes/autogen_user_commands.fr.adoc | 7 ++- doc/it/includes/autogen_user_commands.it.adoc | 7 ++- doc/ja/includes/autogen_user_commands.ja.adoc | 7 ++- doc/pl/includes/autogen_user_commands.pl.adoc | 45 ++++++++++--------- doc/sr/includes/autogen_user_commands.sr.adoc | 43 +++++++++--------- po/cs.po | 11 +++-- po/de.po | 41 +++++++++++++++-- po/es.po | 11 +++-- po/fr.po | 22 +++++---- po/hu.po | 11 +++-- po/it.po | 11 +++-- po/ja.po | 11 +++-- po/pl.po | 41 +++++++++++++++-- po/pt.po | 11 +++-- po/pt_BR.po | 11 +++-- po/ru.po | 11 +++-- po/sr.po | 41 +++++++++++++++-- po/tr.po | 15 +++++-- po/weechat.pot | 11 +++-- src/plugins/irc/irc-command.c | 31 ++++++++++--- 23 files changed, 315 insertions(+), 137 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index e58f52737..4de1342b9 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -26,6 +26,7 @@ New features:: * api: add function file_copy (issue #1667) * api: remember insertion order in hashtables * api: add keys/values with tags in output of irc_message_parse_to_hashtable (issue #1654) + * irc: add option "-parted" in command /allchan (issue #1685) * irc: allow signals "irc_raw_in" and "irc_in" to eat messages (issue #1657) * irc: implement IRCv3.2 SASL authentication, add command /auth, reconnect by default to the server in case of SASL authentication failure (issue #413) * irc: add support of capability "message-tags" and TAGMSG messages (issue #1654) diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc index c863559ea..49ce5da6f 100644 --- a/doc/de/includes/autogen_user_commands.de.adoc +++ b/doc/de/includes/autogen_user_commands.de.adoc @@ -17,30 +17,33 @@ target: Servername * `+allchan+`: führt einen Befehl aus der an alle Kanäle gesendet wird, die mit einem Server verbunden sind ---- -/allchan [-current] [-exclude=[,...]] - [-current] -include=[,...] +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] - -current: führt einen Befehl aus der an alle Kanäle des aktuellen Servers gesendet wird - -exclude: dient zum Ausschluss ausgewählter Kanäle (Platzhalter "*" kann verwendet werden) - -include: findet Anwendung für ausgewählte Kanäle (Platzhalter "*" kann verwendet werden)\n - command: Befehl der ausgeführt werden soll + -current: execute command for channels of current server only + -parted: execute on parted channels only + -exclude: exclude some channels (wildcard "*" is allowed) + -include: include only some channels (wildcard "*" is allowed) + command: command to execute (or text to send to buffer if command does not start with '/') -Argumente und Befehl werden evaluiert (siehe /help eval), folgende Variablen können genutzt werden: - $server Name des Servers - $channel Name des Kanals - $nick Nickname der auf dem Server genutzt wird - ${irc_server.xxx} Variable xxx von Server - ${irc_channel.xxx} Variable xxx von Kanal +Command and arguments are evaluated (see /help eval), the following variables are replaced: + $server server name + $channel channel name + $nick nick on server + ${irc_server.xxx} variable xxx in server + ${irc_channel.xxx} variable xxx in channel -Beispiele: - führe den Befehl '/me Ich teste gerade etwas...' für alle Kanäle aus: - /allchan /me Ich teste gerade etwas... - schicke 'Hallo Welt' an jeden Kanal, ausgenommen an den #weechat Kanal: - /allchan -exclude=#weechat Hallo Welt - schicke 'Hallo Welt' an jeden Kanal, ausgenommen an den #weechat Kanal und Kanäle die mit #linux beginnen: - /allchan -exclude=#weechat,#linux* Hallo Welt - schickt den Text 'Hallo' an alle Kanäle die mit #linux beginnen: - /allchan -include=#linux* Hallo +Examples: + execute '/me is testing' on all channels: + /allchan /me is testing + say 'hello' everywhere but not on #weechat: + /allchan -exclude=#weechat hello + say 'hello' everywhere but not on #weechat and channels beginning with #linux: + /allchan -exclude=#weechat,#linux* hello + say 'hello' on all channels beginning with #linux: + /allchan -include=#linux* hello + close all buffers with parted channels: + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc index 6604d2496..e4d78fbd7 100644 --- a/doc/en/includes/autogen_user_commands.en.adoc +++ b/doc/en/includes/autogen_user_commands.en.adoc @@ -17,10 +17,11 @@ target: server name * `+allchan+`: execute a command on all channels of all connected servers ---- -/allchan [-current] [-exclude=[,...]] - [-current] -include=[,...] +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] -current: execute command for channels of current server only + -parted: execute on parted channels only -exclude: exclude some channels (wildcard "*" is allowed) -include: include only some channels (wildcard "*" is allowed) command: command to execute (or text to send to buffer if command does not start with '/') @@ -41,6 +42,8 @@ Examples: /allchan -exclude=#weechat,#linux* hello say 'hello' on all channels beginning with #linux: /allchan -include=#linux* hello + close all buffers with parted channels: + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc index ef2daad69..b4a294475 100644 --- a/doc/fr/includes/autogen_user_commands.fr.adoc +++ b/doc/fr/includes/autogen_user_commands.fr.adoc @@ -17,10 +17,11 @@ cible : nom du serveur * `+allchan+`: exécuter une commande sur tous les canaux de tous les serveurs connectés ---- -/allchan [-current] [-exclude=[,...]] - [-current] [-include=[,...]] +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] -current : exécuter la commande pour les canaux du serveur courant seulement + -parted : exécuter la commande sur les canaux quittés seulement -exclude : exclure certains canaux (le caractère joker "*" est autorisé) -include : inclure seulement certains canaux (le caractère joker "*" est autorisé) commande : commande à exécuter (ou texte à envoyer au tampon si la commande ne commence pas par '/') @@ -41,6 +42,8 @@ Exemples : /allchan -exclude=#weechat,#linux* bonjour dire 'bonjour' sur tous les canaux commençant par #linux : /allchan -include=#linux* bonjour + fermer tous les tampons avec des canaux quittés : + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc index 05bb80097..bfb729e9e 100644 --- a/doc/it/includes/autogen_user_commands.it.adoc +++ b/doc/it/includes/autogen_user_commands.it.adoc @@ -17,10 +17,11 @@ destinazione: nome server * `+allchan+`: esegue un comando su tutti i canali di tutti i server connessi ---- -/allchan [-current] [-exclude=[,...]] - [-current] -include=[,...] +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] -current: execute command for channels of current server only + -parted: execute on parted channels only -exclude: exclude some channels (wildcard "*" is allowed) -include: include only some channels (wildcard "*" is allowed) command: command to execute (or text to send to buffer if command does not start with '/') @@ -41,6 +42,8 @@ Examples: /allchan -exclude=#weechat,#linux* hello say 'hello' on all channels beginning with #linux: /allchan -include=#linux* hello + close all buffers with parted channels: + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index d180d219b..f30195f42 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -17,10 +17,11 @@ target: サーバ名 * `+allchan+`: 全てのサーバ、全てのチャンネルに対してコマンドを実行 ---- -/allchan [-current] [-exclude=[,...]] - [-current] -include=[,...] +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] -current: execute command for channels of current server only + -parted: execute on parted channels only -exclude: exclude some channels (wildcard "*" is allowed) -include: include only some channels (wildcard "*" is allowed) command: command to execute (or text to send to buffer if command does not start with '/') @@ -41,6 +42,8 @@ Examples: /allchan -exclude=#weechat,#linux* hello say 'hello' on all channels beginning with #linux: /allchan -include=#linux* hello + close all buffers with parted channels: + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc index 1c0ab6cfc..1f17e6bc9 100644 --- a/doc/pl/includes/autogen_user_commands.pl.adoc +++ b/doc/pl/includes/autogen_user_commands.pl.adoc @@ -17,30 +17,33 @@ cel: nazwa serwera * `+allchan+`: wykonuje komendę na wszystkich kanałach na połączonych serwerach ---- -/allchan [-current] [-exclude=[,...]] - [-current] -include=[,...] +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] - -current: wykonuje komendę tylko na kanałach obecnego serwera - -exclude: wyklucza niektóre kanały (wildcard "*" jest dozwolony) - -include: uwzględnia tylko niektóre znaki (wildcard "*" est dozwolony) - komenda: komenda do wykonania (albo tekst do wysłania do bufora jeśli komenda nie zaczyna się od '/') + -current: execute command for channels of current server only + -parted: execute on parted channels only + -exclude: exclude some channels (wildcard "*" is allowed) + -include: include only some channels (wildcard "*" is allowed) + command: command to execute (or text to send to buffer if command does not start with '/') -Komenda i argumenty są przetwarzane (zobacz /help eval), następujące zmienne są podmieniane: - $server nazwa serwera - $channel nazwa kanału - $nick nick na serwerze - ${irc_server.xxx} zmienna xxx na serwerze - ${irc_channel.xxx} zmienna xxx w kanalel +Command and arguments are evaluated (see /help eval), the following variables are replaced: + $server server name + $channel channel name + $nick nick on server + ${irc_server.xxx} variable xxx in server + ${irc_channel.xxx} variable xxx in channel -Przykłady: - wykonuje '/me testuje' na wszystkich kanałach: - /allchan /me testuje - wysyła 'witam' wszędzie tylko nie na #weechat: - /allchan -exclude=#weechat witam - wysyła 'witam' wszędzie poza #weechat oraz kanałami zaczynającymi się od #linux: - /allchan -exclude=#weechat,#linux* witam - wysyła 'witam' na wszytkich kanałach zaczynających się od #linux: - /allchan -include=#linux* witam +Examples: + execute '/me is testing' on all channels: + /allchan /me is testing + say 'hello' everywhere but not on #weechat: + /allchan -exclude=#weechat hello + say 'hello' everywhere but not on #weechat and channels beginning with #linux: + /allchan -exclude=#weechat,#linux* hello + say 'hello' on all channels beginning with #linux: + /allchan -include=#linux* hello + close all buffers with parted channels: + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/doc/sr/includes/autogen_user_commands.sr.adoc b/doc/sr/includes/autogen_user_commands.sr.adoc index 6b35a0a2a..73fc88827 100644 --- a/doc/sr/includes/autogen_user_commands.sr.adoc +++ b/doc/sr/includes/autogen_user_commands.sr.adoc @@ -17,30 +17,33 @@ * `+allchan+`: извршавање команде на свим каналима свих повезаних сервера ---- -/allchan [-current] [-exclude=<канал>[,<канал>...]] <команда> - [-current] -include=<канал>[,<канал>...] <команда> +/allchan [-current] [-parted] [-exclude=[,...]] + [-current] [-parted] -include=[,...] - -current: извршава се команда само за канале текућег сервера - -exclude: неки канали се изузимају (дозвољен је џокер „*”) - -include: узимају се у обзир само неки канали (дозвољен је џокер „*”) - command: команда која треба да се изврши (или текст који се шаље баферу ако команда не почиње са ’/’) + -current: execute command for channels of current server only + -parted: execute on parted channels only + -exclude: exclude some channels (wildcard "*" is allowed) + -include: include only some channels (wildcard "*" is allowed) + command: command to execute (or text to send to buffer if command does not start with '/') -Команде и аргументи се израчунавају (погледајте /help eval), замењују се следеће променљиве: - $server име сервера - $channel име канала - $nick надимак на серверу - ${irc_server.xxx} променљива xxx на серверу - ${irc_channel.xxx} променљива xxx на каналу +Command and arguments are evaluated (see /help eval), the following variables are replaced: + $server server name + $channel channel name + $nick nick on server + ${irc_server.xxx} variable xxx in server + ${irc_channel.xxx} variable xxx in channel -Примери: - извршава ’/me is testing’ на свим каналима: +Examples: + execute '/me is testing' on all channels: /allchan /me is testing - каже ’здраво’ свуда осим на #weechat: - /allchan -exclude=#weechat здраво - каже ’здраво’ свуда осим на #weechat и каналима који почињу са #linux: - /allchan -exclude=#weechat,#linux* здраво - каже ’здраво’ на свим каналима који почињу на #linux: - /allchan -include=#linux* здраво + say 'hello' everywhere but not on #weechat: + /allchan -exclude=#weechat hello + say 'hello' everywhere but not on #weechat and channels beginning with #linux: + /allchan -exclude=#weechat,#linux* hello + say 'hello' on all channels beginning with #linux: + /allchan -include=#linux* hello + close all buffers with parted channels: + /allchan -parted /close ---- [[command_irc_allpv]] diff --git a/po/cs.po b/po/cs.po index 63fa1db60..3b8513b7e 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -6600,13 +6600,14 @@ msgstr "vykonat příkaz na všech kanálech všech připojených serverů" #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[-current] [-exclude=[,...]] []" #, fuzzy msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6629,7 +6630,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: vynechat příkaz pouze pro kanály aktuálního serveru\n" " -exclude: vynechat některé kanály ('*' je povolená na začátku nebo konci " diff --git a/po/de.po b/po/de.po index 669cfd6ab..4160dfabe 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-08-10 14:50+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -8220,15 +8220,46 @@ msgstr "" "führt einen Befehl aus der an alle Kanäle gesendet wird, die mit einem " "Server verbunden sind" +#, fuzzy +#| msgid "" +#| "[-current] [-exclude=[,...]] || [-current] -" +#| "include=[,...] " msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" "[-current] [-exclude=[,...]] || [-current] -" "include=[,...] " +#, fuzzy +#| msgid "" +#| " -current: execute command for channels of current server only\n" +#| " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" +#| " -include: include only some channels (wildcard \"*\" is allowed)\n" +#| " command: command to execute (or text to send to buffer if command does " +#| "not start with '/')\n" +#| "\n" +#| "Command and arguments are evaluated (see /help eval), the following " +#| "variables are replaced:\n" +#| " $server server name\n" +#| " $channel channel name\n" +#| " $nick nick on server\n" +#| " ${irc_server.xxx} variable xxx in server\n" +#| " ${irc_channel.xxx} variable xxx in channel\n" +#| "\n" +#| "Examples:\n" +#| " execute '/me is testing' on all channels:\n" +#| " /allchan /me is testing\n" +#| " say 'hello' everywhere but not on #weechat:\n" +#| " /allchan -exclude=#weechat hello\n" +#| " say 'hello' everywhere but not on #weechat and channels beginning with " +#| "#linux:\n" +#| " /allchan -exclude=#weechat,#linux* hello\n" +#| " say 'hello' on all channels beginning with #linux:\n" +#| " /allchan -include=#linux* hello" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -8251,7 +8282,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: führt einen Befehl aus der an alle Kanäle des aktuellen Servers " "gesendet wird\n" diff --git a/po/es.po b/po/es.po index 57aabeb71..ab5b6443c 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -6808,13 +6808,14 @@ msgstr "" #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[-current] [-exclude=[,...]] []" #, fuzzy msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6837,7 +6838,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: ejecuta comando para los canales del servidor actual solamente\n" " -exclude: excluye algunos canales ('*' está permitido al principio o final " diff --git a/po/fr.po b/po/fr.po index 60062dcd1..a69da79f3 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: 2021-08-02 21:49+0200\n" -"PO-Revision-Date: 2021-08-02 21:49+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" +"PO-Revision-Date: 2021-08-12 18:14+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -8056,14 +8056,15 @@ msgstr "" "exécuter une commande sur tous les canaux de tous les serveurs connectés" msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" -"[-current] [-exclude=[,...]] || [-current] [-" -"include=[,...]] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -8086,10 +8087,13 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current : exécuter la commande pour les canaux du serveur courant " "seulement\n" +" -parted : exécuter la commande sur les canaux quittés seulement\n" " -exclude : exclure certains canaux (le caractère joker \"*\" est " "autorisé)\n" " -include : inclure seulement certains canaux (le caractère joker \"*\" est " @@ -8114,7 +8118,9 @@ msgstr "" "#linux :\n" " /allchan -exclude=#weechat,#linux* bonjour\n" " dire 'bonjour' sur tous les canaux commençant par #linux :\n" -" /allchan -include=#linux* bonjour" +" /allchan -include=#linux* bonjour\n" +" fermer tous les tampons avec des canaux quittés :\n" +" /allchan -parted /close" msgid "execute a command on all private buffers of all connected servers" msgstr "" diff --git a/po/hu.po b/po/hu.po index 109b4349f..909b5944c 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -6183,12 +6183,13 @@ msgstr "CTCP üzenet küldése az összes csatlakoztatott szerver összes szobá #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[alias_név [parancs [paraméterek]]]" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6211,7 +6212,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" #, fuzzy diff --git a/po/it.po b/po/it.po index 890931bfd..4416e7f94 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -6942,13 +6942,14 @@ msgstr "esegue un comando su tutti i canali di tutti i server connessi" #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[-current] [-exclude=[,...]] []" #, fuzzy msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6971,7 +6972,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: esegue il comando solo per i canali del server corrente\n" " -exclude: esclude alcunu canali ('*' è consentito all'inizio o alla fine " diff --git a/po/ja.po b/po/ja.po index bbdc29cbf..909cfd3bd 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese [,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" "[-current] [-exclude=[,...]] [] || [-" "current] -include=[,...] []" @@ -7697,6 +7697,7 @@ msgstr "" #, fuzzy msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -7719,7 +7720,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: 現在のサーバ上のチャンネルに対してコマンドを実行\n" " -exclude: 一部のチャンネルを除く全てのチャンネルに対してコマンドを実行 (ワイ" diff --git a/po/pl.po b/po/pl.po index 4f1db9f21..58275446a 100644 --- a/po/pl.po +++ b/po/pl.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" @@ -7996,15 +7996,46 @@ msgstr "cel: nazwa serwera" msgid "execute a command on all channels of all connected servers" msgstr "wykonuje komendę na wszystkich kanałach na połączonych serwerach" +#, fuzzy +#| msgid "" +#| "[-current] [-exclude=[,...]] || [-current] -" +#| "include=[,...] " msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" "[-current] [-exclude=[,...]] || [-current] -" "include=[,...] " +#, fuzzy +#| msgid "" +#| " -current: execute command for channels of current server only\n" +#| " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" +#| " -include: include only some channels (wildcard \"*\" is allowed)\n" +#| " command: command to execute (or text to send to buffer if command does " +#| "not start with '/')\n" +#| "\n" +#| "Command and arguments are evaluated (see /help eval), the following " +#| "variables are replaced:\n" +#| " $server server name\n" +#| " $channel channel name\n" +#| " $nick nick on server\n" +#| " ${irc_server.xxx} variable xxx in server\n" +#| " ${irc_channel.xxx} variable xxx in channel\n" +#| "\n" +#| "Examples:\n" +#| " execute '/me is testing' on all channels:\n" +#| " /allchan /me is testing\n" +#| " say 'hello' everywhere but not on #weechat:\n" +#| " /allchan -exclude=#weechat hello\n" +#| " say 'hello' everywhere but not on #weechat and channels beginning with " +#| "#linux:\n" +#| " /allchan -exclude=#weechat,#linux* hello\n" +#| " say 'hello' on all channels beginning with #linux:\n" +#| " /allchan -include=#linux* hello" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -8027,7 +8058,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: wykonuje komendę tylko na kanałach obecnego serwera\n" " -exclude: wyklucza niektóre kanały (wildcard \"*\" jest dozwolony)\n" diff --git a/po/pt.po b/po/pt.po index 8fb5f847a..81e8bd413 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -7475,13 +7475,14 @@ msgstr "" #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[-current] [-exclude=[,...]] []" #, fuzzy msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -7504,7 +7505,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: executar o comando só nos canais do servidor atual\n" " -exclude: excluir alguns canais (o caráter universal \"*\" é permitido)\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index e27818bcc..0e22dc25d 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -6834,12 +6834,13 @@ msgstr "" #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[,...] [ []]" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6862,7 +6863,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" msgid "execute a command on all private buffers of all connected servers" diff --git a/po/ru.po b/po/ru.po index d1a78de35..e1b087d61 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -6226,12 +6226,13 @@ msgstr "отправить действие на все каналы всех п #, fuzzy msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "[сокращение [команда [аргументы]]]" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6254,7 +6255,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" #, fuzzy diff --git a/po/sr.po b/po/sr.po index 8b48d3fe0..123e7f5a2 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -7996,15 +7996,46 @@ msgstr "циљ: име сервера" msgid "execute a command on all channels of all connected servers" msgstr "извршавање команде на свим каналима свих повезаних сервера" +#, fuzzy +#| msgid "" +#| "[-current] [-exclude=[,...]] || [-current] -" +#| "include=[,...] " msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" "[-current] [-exclude=<канал>[,<канал>...]] <команда> || [-current] -" "include=<канал>[,<канал>...] <команда>" +#, fuzzy +#| msgid "" +#| " -current: execute command for channels of current server only\n" +#| " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" +#| " -include: include only some channels (wildcard \"*\" is allowed)\n" +#| " command: command to execute (or text to send to buffer if command does " +#| "not start with '/')\n" +#| "\n" +#| "Command and arguments are evaluated (see /help eval), the following " +#| "variables are replaced:\n" +#| " $server server name\n" +#| " $channel channel name\n" +#| " $nick nick on server\n" +#| " ${irc_server.xxx} variable xxx in server\n" +#| " ${irc_channel.xxx} variable xxx in channel\n" +#| "\n" +#| "Examples:\n" +#| " execute '/me is testing' on all channels:\n" +#| " /allchan /me is testing\n" +#| " say 'hello' everywhere but not on #weechat:\n" +#| " /allchan -exclude=#weechat hello\n" +#| " say 'hello' everywhere but not on #weechat and channels beginning with " +#| "#linux:\n" +#| " /allchan -exclude=#weechat,#linux* hello\n" +#| " say 'hello' on all channels beginning with #linux:\n" +#| " /allchan -include=#linux* hello" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -8027,7 +8058,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" " -current: извршава се команда само за канале текућег сервера\n" " -exclude: неки канали се изузимају (дозвољен је џокер „*”)\n" diff --git a/po/tr.po b/po/tr.po index 976e12991..463b61e42 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2021-07-10 16:01+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -6164,15 +6164,20 @@ msgstr "hedef: sunucu adı" msgid "execute a command on all channels of all connected servers" msgstr "" +#, fuzzy +#| msgid "" +#| "[-current] [-exclude=[,...]] || [-current] -" +#| "include=[,...] " msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" "[-current] [-exclude=[,...]] || [-current] -" "include=[,...] " msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -6195,7 +6200,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" msgid "execute a command on all private buffers of all connected servers" diff --git a/po/weechat.pot b/po/weechat.pot index 721ddcc8e..b146d3373 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: 2021-08-03 19:41+0200\n" +"POT-Creation-Date: 2021-08-12 18:13+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -5671,12 +5671,13 @@ msgid "execute a command on all channels of all connected servers" msgstr "" msgid "" -"[-current] [-exclude=[,...]] || [-current] -" -"include=[,...] " +"[-current] [-parted] [-exclude=[,...]] || [-" +"current] [-parted] -include=[,...] " msgstr "" msgid "" " -current: execute command for channels of current server only\n" +" -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if command does not " @@ -5699,7 +5700,9 @@ msgid "" "#linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" -" /allchan -include=#linux* hello" +" /allchan -include=#linux* hello\n" +" close all buffers with parted channels:\n" +" /allchan -parted /close" msgstr "" msgid "execute a command on all private buffers of all connected servers" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 0df532365..61493227c 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -457,6 +457,7 @@ irc_command_exec_buffers (struct t_weelist *list_buffers, void irc_command_exec_all_channels (struct t_irc_server *server, int channel_type, + int parted_channels, int inclusive, const char *str_channels, const char *command) @@ -465,7 +466,7 @@ irc_command_exec_all_channels (struct t_irc_server *server, struct t_irc_channel *ptr_channel, *next_channel; struct t_weelist *list_buffers; char **channels; - int num_channels, picked, i; + int num_channels, picked, i, parted, state_ok; if (!command || !command[0]) return; @@ -493,7 +494,12 @@ irc_command_exec_all_channels (struct t_irc_server *server, { next_channel = ptr_channel->next_channel; - if (ptr_channel->type == channel_type) + parted = ((ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) + && !ptr_channel->nicks) ? + 1 : 0; + state_ok = (!parted_channels || parted); + + if ((ptr_channel->type == channel_type) && state_ok) { picked = (inclusive) ? 0 : 1; @@ -544,7 +550,7 @@ irc_command_exec_all_channels (struct t_irc_server *server, IRC_COMMAND_CALLBACK(allchan) { - int i, current_server, inclusive; + int i, current_server, parted_channels, inclusive; const char *ptr_channels, *ptr_command; IRC_BUFFER_GET_SERVER(buffer); @@ -556,6 +562,7 @@ IRC_COMMAND_CALLBACK(allchan) WEECHAT_COMMAND_MIN_ARGS(2, ""); current_server = 0; + parted_channels = 0; ptr_channels = NULL; inclusive = 0; ptr_command = argv_eol[1]; @@ -576,6 +583,11 @@ IRC_COMMAND_CALLBACK(allchan) current_server = 1; ptr_command = argv_eol[i + 1]; } + else if (weechat_strcasecmp (argv[i], "-parted") == 0) + { + parted_channels = 1; + ptr_command = argv_eol[i + 1]; + } else if (weechat_strncasecmp (argv[i], "-exclude=", 9) == 0) { ptr_channels = argv[i] + 9; @@ -597,6 +609,7 @@ IRC_COMMAND_CALLBACK(allchan) weechat_buffer_set (NULL, "hotlist", "-"); irc_command_exec_all_channels ((current_server) ? ptr_server : NULL, IRC_CHANNEL_TYPE_CHANNEL, + parted_channels, inclusive, ptr_channels, ptr_command); @@ -666,6 +679,7 @@ IRC_COMMAND_CALLBACK(allpv) weechat_buffer_set (NULL, "hotlist", "-"); irc_command_exec_all_channels ((current_server) ? ptr_server : NULL, IRC_CHANNEL_TYPE_PRIVATE, + 0, /* parted channels */ inclusive, ptr_channels, ptr_command); @@ -6478,9 +6492,10 @@ irc_command_init () weechat_hook_command ( "allchan", N_("execute a command on all channels of all connected servers"), - N_("[-current] [-exclude=[,...]] " - " || [-current] -include=[,...] "), + N_("[-current] [-parted] [-exclude=[,...]] " + " || [-current] [-parted] -include=[,...] "), N_(" -current: execute command for channels of current server only\n" + " -parted: execute on parted channels only\n" " -exclude: exclude some channels (wildcard \"*\" is allowed)\n" " -include: include only some channels (wildcard \"*\" is allowed)\n" " command: command to execute (or text to send to buffer if " @@ -6503,8 +6518,10 @@ irc_command_init () "with #linux:\n" " /allchan -exclude=#weechat,#linux* hello\n" " say 'hello' on all channels beginning with #linux:\n" - " /allchan -include=#linux* hello"), - "-current", &irc_command_allchan, NULL, NULL); + " /allchan -include=#linux* hello\n" + " close all buffers with parted channels:\n" + " /allchan -parted /close"), + "-current|-parted", &irc_command_allchan, NULL, NULL); weechat_hook_command ( "allpv", N_("execute a command on all private buffers of all connected servers"),