summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-04-19 20:13:46 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-04-19 20:13:46 +0200
commit3b7bd017161fe91a77d1c8ad455ad22d4d9fe659 (patch)
tree4dd0929a17d0615b625b1c50e6c9018cf9028337
parent7c6723f255ceea7a33e1b3421ce2b4af7583e12b (diff)
downloadweechat-3b7bd017161fe91a77d1c8ad455ad22d4d9fe659.zip
core: allow command mask for infolist_get on command hooks
-rw-r--r--doc/de/autogen/plugin_api/infolists.txt2
-rw-r--r--doc/en/autogen/plugin_api/infolists.txt2
-rw-r--r--doc/fr/autogen/plugin_api/infolists.txt2
-rw-r--r--doc/it/autogen/plugin_api/infolists.txt2
-rw-r--r--po/cs.po9
-rw-r--r--po/de.po7
-rw-r--r--po/es.po9
-rw-r--r--po/fr.po11
-rw-r--r--po/hu.po6
-rw-r--r--po/it.po7
-rw-r--r--po/pl.po8
-rw-r--r--po/pt_BR.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/weechat.pot6
-rw-r--r--src/core/wee-hook.c2
-rw-r--r--src/plugins/plugin-api.c3
16 files changed, 50 insertions, 38 deletions
diff --git a/doc/de/autogen/plugin_api/infolists.txt b/doc/de/autogen/plugin_api/infolists.txt
index f9ed0551b..b66df4b9d 100644
--- a/doc/de/autogen/plugin_api/infolists.txt
+++ b/doc/de/autogen/plugin_api/infolists.txt
@@ -44,7 +44,7 @@
| weechat | history | Verlaufspeicher der Befehle | Buffer Pointer (falls nicht gesetzt, wird der globale Verlauf zurückgegeben) (optional) | -
-| weechat | hook | Auflistung der Hooks | - | type,arguments (type ist command/timer/.., arguments dient dazu nur einige hooks abzufragen, beide Optionen sind optional)
+| weechat | hook | Auflistung der Hooks | - | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional)
| weechat | hotlist | Liste der Buffer in Hotlist | - | -
diff --git a/doc/en/autogen/plugin_api/infolists.txt b/doc/en/autogen/plugin_api/infolists.txt
index be5f18ce3..bd1d9d422 100644
--- a/doc/en/autogen/plugin_api/infolists.txt
+++ b/doc/en/autogen/plugin_api/infolists.txt
@@ -44,7 +44,7 @@
| weechat | history | history of commands | buffer pointer (if not set, return global history) (optional) | -
-| weechat | hook | list of hooks | - | type,arguments (type is command/timer/.., arguments to get only some hooks, both are optional)
+| weechat | hook | list of hooks | - | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional)
| weechat | hotlist | list of buffers in hotlist | - | -
diff --git a/doc/fr/autogen/plugin_api/infolists.txt b/doc/fr/autogen/plugin_api/infolists.txt
index 40094cf98..363dcb4cf 100644
--- a/doc/fr/autogen/plugin_api/infolists.txt
+++ b/doc/fr/autogen/plugin_api/infolists.txt
@@ -44,7 +44,7 @@
| weechat | history | historique des commandes | pointeur vers le tampon (si non défini, retourne l'historique global) (optionnel) | -
-| weechat | hook | liste des hooks | - | type,paramètres (le type est command/timer/.., paramètres pour avoir seulement quelques hooks, les deux sont optionnels)
+| weechat | hook | liste des hooks | - | type,paramètres (le type est command/timer/.., paramètres pour avoir seulement quelques hooks (peut démarrer ou se terminer par "*" comme joker), les deux sont optionnels)
| weechat | hotlist | liste des tampons dans la hotlist | - | -
diff --git a/doc/it/autogen/plugin_api/infolists.txt b/doc/it/autogen/plugin_api/infolists.txt
index a06ffd02c..66e061390 100644
--- a/doc/it/autogen/plugin_api/infolists.txt
+++ b/doc/it/autogen/plugin_api/infolists.txt
@@ -44,7 +44,7 @@
| weechat | history | cronologia dei comandi | puntatore al buffer (se non impostato, restituisce la cronologia globale) (opzionale) | -
-| weechat | hook | elenco di hook | - | tipo,argomenti (il tipo è comando/timer/.., l'argomento solo per ottenere alcuni hook, entrambi sono opzionali)
+| weechat | hook | elenco di hook | - | type,arguments (type is command/timer/.., arguments to get only some hooks (can start or end with "*" as wildcard), both are optional)
| weechat | hotlist | elenco dei buffer nella hotlist | - | -
diff --git a/po/cs.po b/po/cs.po
index f66feaaf4..54388d984 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 17:32+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6427,10 +6427,13 @@ msgstr ""
msgid "list of hooks"
msgstr "seznam napojení"
+#, fuzzy
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
+"jméno položky pole (může začínat nebo končit \"*\" jako zástupným znakem) "
+"(volitelné)"
msgid "list of buffers in hotlist"
msgstr "seznam bufferů v hotlistu"
diff --git a/po/de.po b/po/de.po
index 207101f90..6c68b6137 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-15 21:04+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6722,9 +6722,10 @@ msgstr ""
msgid "list of hooks"
msgstr "Auflistung der Hooks"
+#, fuzzy
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
"type,arguments (type ist command/timer/.., arguments dient dazu nur einige "
"hooks abzufragen, beide Optionen sind optional)"
diff --git a/po/es.po b/po/es.po
index ba372a59e..aaa43c686 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 17:31+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6568,10 +6568,13 @@ msgstr ""
msgid "list of hooks"
msgstr "lista de enganches"
+#, fuzzy
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
+"nombre del elemento de barra (puede empezar o terminar con \"*\" como "
+"comodín) (opcional)"
msgid "list of buffers in hotlist"
msgstr "lista de buffers en la lista de actividad"
diff --git a/po/fr.po b/po/fr.po
index a4593c1dc..c807b7f56 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
-"PO-Revision-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
+"PO-Revision-Date: 2011-04-19 20:10+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -6592,11 +6592,12 @@ msgid "list of hooks"
msgstr "liste des hooks"
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
"type,paramètres (le type est command/timer/.., paramètres pour avoir "
-"seulement quelques hooks, les deux sont optionnels)"
+"seulement quelques hooks (peut démarrer ou se terminer par \"*\" comme "
+"joker), les deux sont optionnels)"
msgid "list of buffers in hotlist"
msgstr "liste des tampons dans la hotlist"
diff --git a/po/hu.po b/po/hu.po
index 4133f1d7a..85e39460a 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 11:21+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6057,8 +6057,8 @@ msgid "list of hooks"
msgstr "Aliaszok listája:\n"
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
#, fuzzy
diff --git a/po/it.po b/po/it.po
index 2845dc100..4b5d874a7 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 17:33+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6537,9 +6537,10 @@ msgstr ""
msgid "list of hooks"
msgstr "elenco di hook"
+#, fuzzy
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
"tipo,argomenti (il tipo è comando/timer/.., l'argomento solo per ottenere "
"alcuni hook, entrambi sono opzionali)"
diff --git a/po/pl.po b/po/pl.po
index fae74d06b..8efaa9894 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 17:32+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6518,10 +6518,12 @@ msgstr ""
msgid "list of hooks"
msgstr "lista powiązań"
+#, fuzzy
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
+"nazwa elementu paska (może się zaczynać lub kończyć \"*\") (opcjonalne)"
msgid "list of buffers in hotlist"
msgstr "lista buforów w hotliście"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index ddf372e5f..ba88ca9bf 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 11:22+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5796,8 +5796,8 @@ msgid "list of hooks"
msgstr ""
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
msgid "list of buffers in hotlist"
diff --git a/po/ru.po b/po/ru.po
index 911fa23de..0dafe9a41 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-10 17:33+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6072,8 +6072,8 @@ msgid "list of hooks"
msgstr "Список сокращений:\n"
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
#, fuzzy
diff --git a/po/weechat.pot b/po/weechat.pot
index 98f08f55d..77e952ee2 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2011-04-17 11:00+0200\n"
+"POT-Creation-Date: 2011-04-19 20:09+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"
@@ -5257,8 +5257,8 @@ msgid "list of hooks"
msgstr ""
msgid ""
-"type,arguments (type is command/timer/.., arguments to get only some hooks, "
-"both are optional)"
+"type,arguments (type is command/timer/.., arguments to get only some hooks "
+"(can start or end with \"*\" as wildcard), both are optional)"
msgstr ""
msgid "list of buffers in hotlist"
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c
index 606c878c9..822359877 100644
--- a/src/core/wee-hook.c
+++ b/src/core/wee-hook.c
@@ -2898,7 +2898,7 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type,
switch (ptr_hook->type)
{
case HOOK_TYPE_COMMAND:
- match = (strcmp (HOOK_COMMAND(ptr_hook, command), arguments) == 0);
+ match = string_match (HOOK_COMMAND(ptr_hook, command), arguments, 0);
break;
default:
break;
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c
index 853dafa2a..f67aca4ff 100644
--- a/src/plugins/plugin-api.c
+++ b/src/plugins/plugin-api.c
@@ -1005,7 +1005,8 @@ plugin_api_init ()
hook_infolist (NULL, "hook", N_("list of hooks"),
NULL,
N_("type,arguments (type is command/timer/.., arguments to "
- "get only some hooks, both are optional)"),
+ "get only some hooks (can start or end with \"*\" as "
+ "wildcard), both are optional)"),
&plugin_api_infolist_get_internal, NULL);
hook_infolist (NULL, "hotlist", N_("list of buffers in hotlist"),
NULL,