1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

Increase number of authorized calls to same command (recursive calls), from 1 to 5 (more than 5 is considered as looping)

This commit is contained in:
Sebastien Helleu
2008-05-22 12:55:37 +02:00
parent ec6f2c2e17
commit a4a4e5126c
10 changed files with 54 additions and 50 deletions
+7 -7
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1576,8 +1576,8 @@ msgid " . description: %s\n"
msgstr " . popis: %s\n"
#, fuzzy, c-format
msgid "%sError: command \"%s\" is running"
msgstr "%s příkaz \"%s\" selhal\n"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s nekorektní hodnota pro volbu \"%s\"\n"
#, fuzzy, c-format
msgid "%sError: unknown command \"%s\" (type /help for help)"
@@ -4570,6 +4570,10 @@ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s chybí argument pro volbu \"%s\"\n"
#, fuzzy
#~ msgid "%sError: command \"%s\" is running"
#~ msgstr "%s příkaz \"%s\" selhal\n"
#, fuzzy
#~ msgid "%s%s: cannot create pipe"
#~ msgstr "%s nemohu vytvořit rouru\n"
@@ -4892,10 +4896,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n"
#~ msgid "name associated to IRC server (for display only)"
#~ msgstr "jméno asociované k IRC serveru (pouze pro zobrazení)"
#, fuzzy
#~ msgid "%sError: incorrect value for option \"%s\""
#~ msgstr "%s nekorektní hodnota pro volbu \"%s\"\n"
#, fuzzy
#~ msgid "No plugin option found with \"%s\""
#~ msgstr "Nebyla nalezena žádná možnost pluginu s \"%s\"\n"
+7 -7
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1570,8 +1570,8 @@ msgid " . description: %s\n"
msgstr " . Beschreibung: %s\n"
#, fuzzy, c-format
msgid "%sError: command \"%s\" is running"
msgstr "%s der Befehl \"%s\" schlug fehl\n"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s ungültiger Wert für die Option \"%s\"\n"
#, fuzzy, c-format
msgid "%sError: unknown command \"%s\" (type /help for help)"
@@ -4560,6 +4560,10 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#, fuzzy
#~ msgid "%sError: command \"%s\" is running"
#~ msgstr "%s der Befehl \"%s\" schlug fehl\n"
#, fuzzy
#~ msgid "%s%s: cannot create pipe"
#~ msgstr "%s Pipe konnte nicht angelegt werden\n"
@@ -4884,10 +4888,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n"
#~ msgid "name associated to IRC server (for display only)"
#~ msgstr "mit dem IRC-Server assoziierter eindeutiger Name (nur zur Anzeige)"
#, fuzzy
#~ msgid "%sError: incorrect value for option \"%s\""
#~ msgstr "%s ungültiger Wert für die Option \"%s\"\n"
#, fuzzy
#~ msgid "No plugin option found with \"%s\""
#~ msgstr "Keine Plugin-Optionen mit \"%s\" gefunden\n"
+7 -7
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: 2007-09-19 12:09+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1559,8 +1559,8 @@ msgid " . description: %s\n"
msgstr " . descripción: %s\n"
#, fuzzy, c-format
msgid "%sError: command \"%s\" is running"
msgstr "%s el comando \"%s\" ha fallado\n"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s valor incorrecto para la opción \"%s\"\n"
#, fuzzy, c-format
msgid "%sError: unknown command \"%s\" (type /help for help)"
@@ -4568,6 +4568,10 @@ msgstr "%s no es posible crear el servidor\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s falta un argumento para la opción --dir\n"
#, fuzzy
#~ msgid "%sError: command \"%s\" is running"
#~ msgstr "%s el comando \"%s\" ha fallado\n"
#, fuzzy
#~ msgid "%s%s: cannot create pipe"
#~ msgstr "%s no ha sido posible crear la interconexión\n"
@@ -4889,10 +4893,6 @@ msgstr "%s falta un argumento para la opción --dir\n"
#~ msgid "name associated to IRC server (for display only)"
#~ msgstr "nombre asociado al servidor IRC (para mostrar solamente)"
#, fuzzy
#~ msgid "%sError: incorrect value for option \"%s\""
#~ msgstr "%s valor incorrecto para la opción \"%s\"\n"
#, fuzzy
#~ msgid "No plugin option found with \"%s\""
#~ msgstr "Ninguna opción de plugin encontrada con \"%s\"\n"
+4 -7
View File
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"PO-Revision-Date: 2008-05-20 10:07+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: 2008-05-22 12:52+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1515,8 +1515,8 @@ msgid " . description: %s\n"
msgstr " . description: %s\n"
#, c-format
msgid "%sError: command \"%s\" is running"
msgstr "%sErreur: la commande \"%s\" est en cours d'exécution"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%sErreur: trop d'appels à la commande \"%s\" (boucle)"
#, c-format
msgid "%sError: unknown command \"%s\" (type /help for help)"
@@ -4503,6 +4503,3 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket"
#, c-format
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s"
#~ msgid "%s%s: cannot create pipe"
#~ msgstr "%s%s: impossible de créer le tube"
+7 -7
View File
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: 2007-10-10 18:07+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1579,8 +1579,8 @@ msgid " . description: %s\n"
msgstr " . leírás : %s\n"
#, fuzzy, c-format
msgid "%sError: command \"%s\" is running"
msgstr "%s a \"%s\" parancs végrehajtása sikertelen\n"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s helytelen érték a \"%s\" paraméternek\n"
#, fuzzy, c-format
msgid "%sError: unknown command \"%s\" (type /help for help)"
@@ -4574,6 +4574,10 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n"
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy
#~ msgid "%sError: command \"%s\" is running"
#~ msgstr "%s a \"%s\" parancs végrehajtása sikertelen\n"
#, fuzzy
#~ msgid "%s%s: cannot create pipe"
#~ msgstr "%s nem sikerült a csövet(pipe) létrehozni\n"
@@ -4897,10 +4901,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#~ msgid "name associated to IRC server (for display only)"
#~ msgstr "az IRC szerverhez rendelt név (csak megjelenítéshez)"
#, fuzzy
#~ msgid "%sError: incorrect value for option \"%s\""
#~ msgstr "%s helytelen érték a \"%s\" paraméternek\n"
#, fuzzy
#~ msgid "No plugin option found with \"%s\""
#~ msgstr "A(z) \"%s\" kifejezéshez nem található modul opció\n"
+7 -7
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1582,8 +1582,8 @@ msgid " . description: %s\n"
msgstr " . описание: %s\n"
#, fuzzy, c-format
msgid "%sError: command \"%s\" is running"
msgstr "%s команда \"%s\" не удалась\n"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s некорректное значение параметра \"%s\"\n"
#, fuzzy, c-format
msgid "%sError: unknown command \"%s\" (type /help for help)"
@@ -4559,6 +4559,10 @@ msgstr "%s DCC: не могу установить неблокирующий р
msgid "%s%s: timeout for \"%s\" with %s"
msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy
#~ msgid "%sError: command \"%s\" is running"
#~ msgstr "%s команда \"%s\" не удалась\n"
#, fuzzy
#~ msgid "%s%s: cannot create pipe"
#~ msgstr "%s не могу создать pipe\n"
@@ -4882,10 +4886,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#~ msgid "name associated to IRC server (for display only)"
#~ msgstr "имя IRC сервера (для внутреннего пользования)"
#, fuzzy
#~ msgid "%sError: incorrect value for option \"%s\""
#~ msgstr "%s некорректное значение параметра \"%s\"\n"
#, fuzzy
#~ msgid "No plugin option found with \"%s\""
#~ msgstr "Не найден параметр pluginа с \"%s\"\n"
+2 -2
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-05-20 10:06+0200\n"
"POT-Creation-Date: 2008-05-22 12:51+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1295,7 +1295,7 @@ msgid " . description: %s\n"
msgstr ""
#, c-format
msgid "%sError: command \"%s\" is running"
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr ""
#, c-format
+6 -5
View File
@@ -417,9 +417,10 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
&& ((argv[0][0] == '/') && (string_strcasecmp (argv[0] + 1,
HOOK_COMMAND(ptr_hook, command)) == 0)))
{
if (ptr_hook->running)
command_is_running = 1;
else
if (ptr_hook->running > 0)
command_is_running = ptr_hook->running;
if (ptr_hook->running < HOOK_COMMAND_MAX_CALLS)
{
if (ptr_hook->plugin == plugin)
{
@@ -452,10 +453,10 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
if (ptr_hook)
{
ptr_hook->running = 1;
ptr_hook->running++;
rc = (int) (HOOK_COMMAND(ptr_hook, callback))
(ptr_hook->callback_data, buffer, argc, argv, argv_eol);
ptr_hook->running = 0;
ptr_hook->running--;
if (rc == WEECHAT_RC_ERROR)
rc = 0;
else
+5
View File
@@ -44,10 +44,15 @@ enum t_hook_type
HOOK_NUM_TYPES,
};
/* max calls that can be done for a command (recursive calls) */
#define HOOK_COMMAND_MAX_CALLS 5
/* flags for fd hooks */
#define HOOK_FD_FLAG_READ 1
#define HOOK_FD_FLAG_WRITE 2
#define HOOK_FD_FLAG_EXCEPTION 4
/* macros to access hook specific data */
#define HOOK_COMMAND(hook, var) (((struct t_hook_command *)hook->hook_data)->var)
#define HOOK_TIMER(hook, var) (((struct t_hook_timer *)hook->hook_data)->var)
#define HOOK_FD(hook, var) (((struct t_hook_fd *)hook->hook_data)->var)
+2 -1
View File
@@ -114,7 +114,8 @@ input_exec_command (struct t_gui_buffer *buffer,
break;
case -3: /* command is running */
gui_chat_printf (NULL,
_("%sError: command \"%s\" is running"),
_("%sError: too much calls to command \"%s\" "
"(looping)"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
command + 1);
break;