1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

trigger: make optional the alignment on second and max calls (in hook timer)

This commit is contained in:
Sebastien Helleu
2014-03-01 17:25:48 +01:00
parent 050d2023d6
commit 44b8447ff0
20 changed files with 37 additions and 50 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ listdefault: list default triggers
print: buffer, tags, message, strip colors
command: command (required), description, arguments, description of arguments, completion
command_run: command (required)
timer: interval (required), align on second (required), max calls (required)
timer: interval (required), align on second, max calls
config: name of option (required)
focus: name(s) of area (required)
conditions: evaluated conditions for the trigger
+1 -1
View File
@@ -30,7 +30,7 @@ listdefault: list default triggers
print: buffer, tags, message, strip colors
command: command (required), description, arguments, description of arguments, completion
command_run: command (required)
timer: interval (required), align on second (required), max calls (required)
timer: interval (required), align on second, max calls
config: name of option (required)
focus: name(s) of area (required)
conditions: evaluated conditions for the trigger
+1 -1
View File
@@ -30,7 +30,7 @@ listdefault: lister les triggers par défaut
print: tampon, étiquettes, message, suppression des couleurs (0/1)
command: commande (obligatoire), description, paramètres, description des paramètres, complétion
command_run: commande (obligatoire)
timer: intervalle (obligatoire), alignement sur la seconde (obligatoire), nombre max d'appels (obligatoire)
timer: intervalle (obligatoire), alignement sur la seconde, nombre max d'appels
config: nom de l'option (obligatoire)
focus: nom(s) de la zone (obligatoire)
conditions: conditions évaluées pour le trigger
+1 -1
View File
@@ -30,7 +30,7 @@ listdefault: list default triggers
print: buffer, tags, message, strip colors
command: command (required), description, arguments, description of arguments, completion
command_run: command (required)
timer: interval (required), align on second (required), max calls (required)
timer: interval (required), align on second, max calls
config: name of option (required)
focus: name(s) of area (required)
conditions: evaluated conditions for the trigger
+1 -1
View File
@@ -30,7 +30,7 @@ listdefault: list default triggers
print: buffer, tags, message, strip colors
command: command (required), description, arguments, description of arguments, completion
command_run: command (required)
timer: interval (required), align on second (required), max calls (required)
timer: interval (required), align on second, max calls
config: name of option (required)
focus: name(s) of area (required)
conditions: evaluated conditions for the trigger
+1 -1
View File
@@ -30,7 +30,7 @@ listdefault: list default triggers
print: buffer, tags, message, strip colors
command: command (required), description, arguments, description of arguments, completion
command_run: command (required)
timer: interval (required), align on second (required), max calls (required)
timer: interval (required), align on second, max calls
config: name of option (required)
focus: name(s) of area (required)
conditions: evaluated conditions for the trigger
+2 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:24+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9853,8 +9853,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:24+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -10994,8 +10994,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10117,8 +10117,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+5 -6
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"PO-Revision-Date: 2014-02-28 14:58+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-03-01 17:22+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -10739,8 +10739,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
@@ -10817,8 +10816,8 @@ msgstr ""
" command: commande (obligatoire), description, paramètres, "
"description des paramètres, complétion\n"
" command_run: commande (obligatoire)\n"
" timer: intervalle (obligatoire), alignement sur la seconde "
"(obligatoire), nombre max d'appels (obligatoire)\n"
" timer: intervalle (obligatoire), alignement sur la seconde, "
"nombre max d'appels\n"
" config: nom de l'option (obligatoire)\n"
" focus: nom(s) de la zone (obligatoire)\n"
" conditions: conditions évaluées pour le trigger\n"
+2 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9254,8 +9254,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10283,8 +10283,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@@ -10355,8 +10355,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10540,8 +10540,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9487,8 +9487,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-20 12:25+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9278,8 +9278,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2014-02-16 11:21+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8326,8 +8326,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+2 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-02-28 14:57+0100\n"
"POT-Creation-Date: 2014-03-01 17:21+0100\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8277,8 +8277,7 @@ msgid ""
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), max "
"calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+1 -2
View File
@@ -915,8 +915,7 @@ trigger_command_init ()
" command: command (required), description, arguments, "
"description of arguments, completion\n"
" command_run: command (required)\n"
" timer: interval (required), align on second (required), "
"max calls (required)\n"
" timer: interval (required), align on second, max calls\n"
" config: name of option (required)\n"
" focus: name(s) of area (required)\n"
" conditions: evaluated conditions for the trigger\n"
+3 -3
View File
@@ -365,14 +365,14 @@ trigger_hook (struct t_trigger *trigger)
}
break;
case TRIGGER_HOOK_TIMER:
if (argv && (argc >= 3))
if (argv && (argc >= 1))
{
error1 = NULL;
error2 = NULL;
error3 = NULL;
interval = strtol (argv[0], &error1, 10);
align_second = strtol (argv[1], &error2, 10);
max_calls = strtol (argv[2], &error3, 10);
align_second = strtol ((argc >= 2) ? argv[1] : "0", &error2, 10);
max_calls = strtol ((argc >= 3) ? argv[2] : "0", &error3, 10);
if (error1 && !error1[0]
&& error2 && !error2[0]
&& error3 && !error3[0]