From b3cf270d1d938ffa9960ccb5e39d5a0ed166f594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 29 Mar 2019 08:37:57 +0100 Subject: [PATCH] core: allow text in addition to a command in command /repeat --- ChangeLog.adoc | 1 + doc/de/autogen/user/weechat_commands.adoc | 12 ++-- doc/en/autogen/user/weechat_commands.adoc | 2 +- doc/fr/autogen/user/weechat_commands.adoc | 2 +- doc/it/autogen/user/weechat_commands.adoc | 12 ++-- doc/ja/autogen/user/weechat_commands.adoc | 12 ++-- doc/pl/autogen/user/weechat_commands.adoc | 12 ++-- po/cs.po | 6 +- po/de.po | 7 ++- po/es.po | 7 ++- po/fr.po | 12 ++-- po/hu.po | 6 +- po/it.po | 7 ++- po/ja.po | 7 ++- po/pl.po | 7 ++- po/pt.po | 7 ++- po/pt_BR.po | 7 ++- po/ru.po | 6 +- po/tr.po | 6 +- po/weechat.pot | 6 +- src/core/wee-command.c | 74 +++++++++-------------- 21 files changed, 106 insertions(+), 112 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4c6e21302..7d70ece60 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: allow text in addition to a command in command /repeat * core: add option "addreplace" in command /filter (issue #1055, issue #1312) * api: replace argument "keep_eol" by "flags" in function string_split (issue #1322) * api: add function command_options (issue #928) diff --git a/doc/de/autogen/user/weechat_commands.adoc b/doc/de/autogen/user/weechat_commands.adoc index 57b161278..0c284ec33 100644 --- a/doc/de/autogen/user/weechat_commands.adoc +++ b/doc/de/autogen/user/weechat_commands.adoc @@ -757,14 +757,14 @@ Ohne Angabe von Argumenten werden alle Konfigurationen (WeeChat und Erweiterunge ---- /repeat [-interval ] - delay: Verzögerung zwischen dem Ausführen der Befehle (in Millisekunden) - count: Anzahl wie oft der Befehl ausgeführt werden soll -command: Befehl welcher ausgeführt werden soll (das Befehlszeichen '/' wird automatisch hinzugefügt, falls es zum Befehlsbeginn nicht gefunden werden sollte) + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (or text to send to buffer if command does not start with '/') -Alle Befehle werden in dem Buffer ausgeführt, in welchem dieser Befehl genutzt wird. +All commands are executed on buffer where this command was issued. -Beispiel: - scrolle zwei Seiten hoch: +Example: + scroll 2 pages up: /repeat 2 /window page_up ---- diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc index 34dbbf7cf..d1dbf186a 100644 --- a/doc/en/autogen/user/weechat_commands.adoc +++ b/doc/en/autogen/user/weechat_commands.adoc @@ -759,7 +759,7 @@ Without argument, all files (WeeChat and plugins) are reloaded. delay: delay between execution of commands (in milliseconds) count: number of times to execute command -command: command to execute (a '/' is automatically added if not found at beginning of command) +command: command to execute (or text to send to buffer if command does not start with '/') All commands are executed on buffer where this command was issued. diff --git a/doc/fr/autogen/user/weechat_commands.adoc b/doc/fr/autogen/user/weechat_commands.adoc index 0e13fe363..e1530be35 100644 --- a/doc/fr/autogen/user/weechat_commands.adoc +++ b/doc/fr/autogen/user/weechat_commands.adoc @@ -759,7 +759,7 @@ Sans paramètre, tous les fichiers (WeeChat et extensions) sont rechargés. délai : délai entre l'exécution des commandes (en millisecondes) nombre : nombre de fois que la commande sera exécutée -commande : commande à exécuter (un '/' est automatiquement ajouté s'il n'est pas trouvé au début de la commande) +commande : commande à exécuter (ou texte à envoyer au tampon si la commande ne commence pas par '/') Toutes les commandes sont exécutées sur le tampon où la commande a été lancée. diff --git a/doc/it/autogen/user/weechat_commands.adoc b/doc/it/autogen/user/weechat_commands.adoc index 3ffc1dfe3..0a2d74b71 100644 --- a/doc/it/autogen/user/weechat_commands.adoc +++ b/doc/it/autogen/user/weechat_commands.adoc @@ -757,14 +757,14 @@ Senza argomento, vengono ricaricati tutti i file (WeeChat e plugin). ---- /repeat [-interval ] -ritardo: ritardo tra l'esecuzione dei comandi (in millisecondi) - numero: numero di volte in cui eseguire il comando -comando: comando da eseguire (una '/' viene aggiunta automaticamente se non viene trovata all'inizio del comando) + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (or text to send to buffer if command does not start with '/') -Tutti i comandi sono eseguiti sul buffer su cui viene dato il comando. +All commands are executed on buffer where this command was issued. -Esempio: - scorre due pagine in alto: +Example: + scroll 2 pages up: /repeat 2 /window page_up ---- diff --git a/doc/ja/autogen/user/weechat_commands.adoc b/doc/ja/autogen/user/weechat_commands.adoc index 0648d7c53..17d62b16d 100644 --- a/doc/ja/autogen/user/weechat_commands.adoc +++ b/doc/ja/autogen/user/weechat_commands.adoc @@ -757,14 +757,14 @@ file: リロードする設定ファイル (拡張子 ".conf" は不要) ---- /repeat [-interval ] - delay: コマンドの実行間隔 (ミリ秒単位) - count: コマンドの実行回数 -command: 実行するコマンド (最初に '/' が無い場合は自動的に追加されます) + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (or text to send to buffer if command does not start with '/') -全てのコマンドはこのコマンドが発行されたバッファで実行されます。 +All commands are executed on buffer where this command was issued. -例: - 2 ページ分上方向にスクロール: +Example: + scroll 2 pages up: /repeat 2 /window page_up ---- diff --git a/doc/pl/autogen/user/weechat_commands.adoc b/doc/pl/autogen/user/weechat_commands.adoc index 557ea128a..d6f30ba99 100644 --- a/doc/pl/autogen/user/weechat_commands.adoc +++ b/doc/pl/autogen/user/weechat_commands.adoc @@ -757,14 +757,14 @@ Bez podania argumentu wszystkie pliki (WeeChat oraz wtyczki) zostaną przeładow ---- /repeat [-interval ] - opóźnienie: czas pomiędzy wykonaniem komend (w milisekundach) - ilość: ile razy wykonać komendę -komenda: komenda do wykonania ('/' jest automatycznie dodawane, jeśli nie znajduje się na początku komendy) + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (or text to send to buffer if command does not start with '/') -Wszystkie komendy wykonane zostaną na buforze, w którym wykonano tą komendę. +All commands are executed on buffer where this command was issued. -Przykład: - przewija 2 strony do góry: +Example: + scroll 2 pages up: /repeat 2 /window page_up ---- diff --git a/po/cs.po b/po/cs.po index 1436d59bb..024d37f46 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-17 18:32+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -2296,8 +2296,8 @@ msgstr "[-interval ] " msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/de.po b/po/de.po index 23e853a6d..13fddfbf3 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-21 23:31+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -2722,11 +2722,12 @@ msgstr "führt einen Befehl mehrfach aus" msgid "[-interval ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/es.po b/po/es.po index d5b0db3fb..d7a966aeb 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -2394,11 +2394,12 @@ msgstr "ejecuta un comando varias veces" msgid "[-interval ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/fr.po b/po/fr.po index fb66a4fb2..a7b465cba 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-21 23:30+0100\n" -"PO-Revision-Date: 2019-03-21 23:31+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" +"PO-Revision-Date: 2019-03-29 08:37+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -2657,8 +2657,8 @@ msgstr "[-interval ] " msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" @@ -2668,8 +2668,8 @@ msgid "" msgstr "" " délai : délai entre l'exécution des commandes (en millisecondes)\n" " nombre : nombre de fois que la commande sera exécutée\n" -"commande : commande à exécuter (un '/' est automatiquement ajouté s'il n'est " -"pas trouvé au début de la commande)\n" +"commande : commande à exécuter (ou texte à envoyer au tampon si la commande " +"ne commence pas par '/')\n" "\n" "Toutes les commandes sont exécutées sur le tampon où la commande a été " "lancée.\n" diff --git a/po/hu.po b/po/hu.po index 7e76ecbb2..d4587b49a 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-02-28 20:18+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -2035,8 +2035,8 @@ msgstr "" msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/it.po b/po/it.po index e014b988c..115c4dbb6 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -2437,11 +2437,12 @@ msgstr "esegue un comando più volte" msgid "[-interval ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/ja.po b/po/ja.po index 3ddb8a1b2..8c2dfa823 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-21 23:32+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/pl.po b/po/pl.po index 53bf2944a..9bd7aa093 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: 2019-03-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-21 23:32+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" @@ -2631,11 +2631,12 @@ msgstr "wykonuje komendę kilka razy" msgid "[-interval ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/pt.po b/po/pt.po index ef3e61310..70ae2d2fd 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-21 23:33+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -2587,11 +2587,12 @@ msgstr "executar um comando várias vezes" msgid "[-interval ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index f5043aea9..76a1651d0 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-11 21:10+0100\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -2420,11 +2420,12 @@ msgstr "executa um comando várias vezes" msgid "[-interval ] " msgstr "[-interval ] " +#, fuzzy msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/ru.po b/po/ru.po index 120732024..ed4a5320c 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+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" @@ -2058,8 +2058,8 @@ msgstr "" msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/tr.po b/po/tr.po index d6b02e5df..7453752b6 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2019-03-17 16:04+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -1855,8 +1855,8 @@ msgstr "" msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/po/weechat.pot b/po/weechat.pot index c36ff83fa..31981a4d7 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-21 23:30+0100\n" +"POT-Creation-Date: 2019-03-29 07:53+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -1854,8 +1854,8 @@ msgstr "" msgid "" " delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" -"command: command to execute (a '/' is automatically added if not found at " -"beginning of command)\n" +"command: command to execute (or text to send to buffer if command does not " +"start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index bdccee749..b37c37539 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -5228,8 +5228,7 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls) /* execute command */ if (ptr_buffer) - (void) input_exec_command (ptr_buffer, 1, NULL, repeat_args[1], - repeat_args[2]); + (void) input_data (ptr_buffer, repeat_args[1], repeat_args[2]); } if (remaining_calls == 0) @@ -5251,8 +5250,8 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls) COMMAND_CALLBACK(repeat) { - int arg_count, count, interval, length, i; - char *error, *command, **repeat_args; + int arg_count, count, interval, i; + char *error, **repeat_args; /* make C compiler happy */ (void) pointer; @@ -5283,52 +5282,39 @@ COMMAND_CALLBACK(repeat) return WEECHAT_RC_OK; } - if (string_is_command_char (argv_eol[arg_count + 1])) - command = strdup (argv_eol[arg_count + 1]); - else - { - length = strlen (argv_eol[arg_count + 1]) + 2; - command = malloc (length); - if (command) - snprintf (command, length, "/%s", argv_eol[arg_count + 1]); - } + /* first execute command now */ + (void) input_data (buffer, argv_eol[arg_count + 1], NULL); - if (command) + /* repeat execution of command */ + if (count > 1) { - (void) input_exec_command (buffer, 1, NULL, command, NULL); - if (count > 1) + if (interval == 0) { - if (interval == 0) + /* execute command multiple times now */ + for (i = 0; i < count - 1; i++) { - for (i = 0; i < count - 1; i++) - { - (void) input_exec_command (buffer, 1, NULL, command, NULL); - } - free (command); - } - else - { - repeat_args = malloc (3 * sizeof (*repeat_args)); - if (!repeat_args) - { - gui_chat_printf (NULL, - _("%sNot enough memory (%s)"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - "/repeat"); - return WEECHAT_RC_OK; - } - repeat_args[0] = strdup (buffer->full_name); - repeat_args[1] = command; - repeat_args[2] = (input_commands_allowed) ? - string_build_with_split_string ( - (const char **)input_commands_allowed, ",") : NULL; - hook_timer (NULL, interval, 0, count - 1, - &command_repeat_timer_cb, repeat_args, NULL); + (void) input_data (buffer, argv_eol[arg_count + 1], NULL); } } else { - free (command); + /* schedule execution of command in future */ + repeat_args = malloc (3 * sizeof (*repeat_args)); + if (!repeat_args) + { + gui_chat_printf (NULL, + _("%sNot enough memory (%s)"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + "/repeat"); + return WEECHAT_RC_OK; + } + repeat_args[0] = strdup (buffer->full_name); + repeat_args[1] = strdup (argv_eol[arg_count + 1]); + repeat_args[2] = (input_commands_allowed) ? + string_build_with_split_string ( + (const char **)input_commands_allowed, ",") : NULL; + hook_timer (NULL, interval, 0, count - 1, + &command_repeat_timer_cb, repeat_args, NULL); } } @@ -7963,8 +7949,8 @@ command_init () N_("[-interval ] "), N_(" delay: delay between execution of commands (in milliseconds)\n" " count: number of times to execute command\n" - "command: command to execute (a '/' is automatically added if not " - "found at beginning of command)\n" + "command: command to execute (or text to send to buffer if command " + "does not start with '/')\n" "\n" "All commands are executed on buffer where this command was issued.\n" "\n"