mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 18:23:13 +02:00
trigger: add hook "info"
This commit is contained in:
@@ -3659,7 +3659,7 @@ Liste der standardmäßigen Trigger:
|
||||
Ein Trigger hat folgende Optionen (Benennung ist
|
||||
`trigger.trigger.<name>.<option>`):
|
||||
|
||||
[width="100%",cols="2m,2,10",options="header"]
|
||||
[width="100%",cols="2m,3,10",options="header"]
|
||||
|===
|
||||
| Option | Wert | Beschreibung
|
||||
|
||||
@@ -3667,7 +3667,7 @@ Ein Trigger hat folgende Optionen (Benennung ist
|
||||
Wenn die Option auf `off` gesetzt ist, dann ist der Trigger deaktiviert und die Ausführung ist gestoppt.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
`command_run`, `timer`, `config`, `focus`, `info` |
|
||||
Der hook welcher durch Trigger genutzt werden soll. Für weitere Informationen siehe
|
||||
link:weechat_plugin_api.en.html#hooks[Anleitung für API Erweiterung / Hooks] (Englisch).
|
||||
|
||||
@@ -3720,7 +3720,8 @@ abgearbeitet:
|
||||
. Überprüfung von Bedingungen; falls unwahr, beenden
|
||||
. ersetze Text mittels erweitertem regulärer POSIX Ausdruck (sofern im Trigger definiert)
|
||||
. ein oder mehrere Befehle werden ausgeführt (sofern im Trigger definiert)
|
||||
. Beendigung mit einem Rückgabewert (ausgenommen sind die Hooks _modifier_ und _focus_)
|
||||
. Beendigung mit einem Rückgabewert (ausgenommen sind die Hooks _modifier_,
|
||||
_line_, _focus_ und _info_)
|
||||
. Aktion welche nach der Abarbeitung des Triggers ausgeführt werden soll (falls der Wert abweichend von `none` sein sollte).
|
||||
|
||||
[[trigger_hook_arguments]]
|
||||
@@ -3817,6 +3818,14 @@ ein Semikolon getrennt.
|
||||
3. ... |
|
||||
`+buffer_nicklist+` |
|
||||
link:weechat_plugin_api.en.html#_hook_focus[hook_focus] (Englisch)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| info |
|
||||
1. info name (Priorität erlaubt) (erforderlich) +
|
||||
2. info name (Priorität erlaubt) +
|
||||
3. ... |
|
||||
`+my_info+` |
|
||||
link:weechat_plugin_api.en.html#_hook_info[hook_info] (Englisch)
|
||||
|===
|
||||
|
||||
[[trigger_conditions]]
|
||||
@@ -3864,6 +3873,7 @@ welche abhängig von dem genutzten Hook ist:
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
| info | tg_info | tg_info
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4165,6 +4175,20 @@ Der Callback von "focus" legt folgende Variablen in der Hashtable an:
|
||||
|
||||
Das Hashtable enthält alle Schlüssel/Werte (Typ: string/string).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[trigger_data_info]]
|
||||
===== Info
|
||||
|
||||
Der Callback von "info" legt folgende Variablen in der Hashtable an:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Typ | Beschreibung
|
||||
| tg_info_name | string | Name of info.
|
||||
| tg_arguments | string | Arguments.
|
||||
| tg_info | string | Empty string (the info to return).
|
||||
|===
|
||||
|
||||
[[trigger_examples]]
|
||||
==== Beispiele
|
||||
|
||||
|
||||
@@ -3578,7 +3578,7 @@ List of default triggers:
|
||||
A trigger has the following options (names are
|
||||
`trigger.trigger.<name>.<option>`):
|
||||
|
||||
[width="100%",cols="2m,2,10",options="header"]
|
||||
[width="100%",cols="2m,3,10",options="header"]
|
||||
|===
|
||||
| Option | Values | Description
|
||||
|
||||
@@ -3587,7 +3587,7 @@ A trigger has the following options (names are
|
||||
any more.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
`command_run`, `timer`, `config`, `focus`, `info` |
|
||||
The hook used in trigger. For more information, see
|
||||
link:weechat_plugin_api.en.html#hooks[WeeChat plugin API reference / Hooks].
|
||||
|
||||
@@ -3638,7 +3638,8 @@ order, if triggers are globally enabled and if the trigger itself is enabled:
|
||||
. check trigger conditions: if false, exit
|
||||
. replace text in trigger using regular expression(s)
|
||||
. execute command(s)
|
||||
. exit with a return code (except for hooks _modifier_ and _focus_)
|
||||
. exit with a return code (except for hooks _modifier_, _line_, _focus_ and
|
||||
_info_)
|
||||
. perform post action (if different from `none`).
|
||||
|
||||
[[trigger_hook_arguments]]
|
||||
@@ -3734,6 +3735,13 @@ The arguments depend on the hook used. They are separated by semicolons.
|
||||
3. ... |
|
||||
`+buffer_nicklist+` |
|
||||
link:weechat_plugin_api.en.html#_hook_focus[hook_focus]
|
||||
|
||||
| info |
|
||||
1. info name (priority allowed) (required) +
|
||||
2. info name (priority allowed) +
|
||||
3. ... |
|
||||
`+my_info+` |
|
||||
link:weechat_plugin_api.en.html#_hook_info[hook_info]
|
||||
|===
|
||||
|
||||
[[trigger_conditions]]
|
||||
@@ -3779,6 +3787,7 @@ type:
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
| info | tg_info | tg_info
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4075,6 +4084,19 @@ The "focus" callback sets following variables in hashtable:
|
||||
The hashtable contains all keys/values from hashtable received (type:
|
||||
string/string).
|
||||
|
||||
[[trigger_data_info]]
|
||||
===== Info
|
||||
|
||||
The "info" callback sets following variables in hashtable:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| tg_info_name | string | Name of info.
|
||||
| tg_arguments | string | Arguments.
|
||||
| tg_info | string | Empty string (the info to return).
|
||||
|===
|
||||
|
||||
[[trigger_examples]]
|
||||
==== Examples
|
||||
|
||||
|
||||
@@ -3692,7 +3692,7 @@ Liste des triggers par défaut :
|
||||
Un trigger a les options suivantes (les noms sont
|
||||
`trigger.trigger.<nom>.<option>`) :
|
||||
|
||||
[width="100%",cols="2m,2,10",options="header"]
|
||||
[width="100%",cols="2m,3,10",options="header"]
|
||||
|===
|
||||
| Option | Valeurs | Description
|
||||
|
||||
@@ -3701,7 +3701,7 @@ Un trigger a les options suivantes (les noms sont
|
||||
plus exécutées.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
`command_run`, `timer`, `config`, `focus`, `info` |
|
||||
Le "hook" utilisé dans le trigger. Pour plus d'information, voir la
|
||||
link:weechat_plugin_api.fr.html#hooks[Référence API extension WeeChat / Hooks].
|
||||
|
||||
@@ -3756,7 +3756,8 @@ le trigger lui-même est activé :
|
||||
. vérifier les conditions du trigger : si faux, sortir
|
||||
. remplacer du texte dans le trigger en utilisant des expressions régulières
|
||||
. exécuter la/les commande(s)
|
||||
. sortir avec un code retour (sauf pour les "hooks" _modifier_ et _focus_)
|
||||
. sortir avec un code retour (sauf pour les "hooks" _modifier_, _line_,
|
||||
_focus_ et _info_)
|
||||
. effectuer l'action "post" (si différente de `none`).
|
||||
|
||||
[[trigger_hook_arguments]]
|
||||
@@ -3853,6 +3854,13 @@ points-virgules.
|
||||
3. ... |
|
||||
`+buffer_nicklist+` |
|
||||
link:weechat_plugin_api.fr.html#_hook_focus[hook_focus]
|
||||
|
||||
| info |
|
||||
1. nom de l'info (priorité autorisée) (obligatoire) +
|
||||
2. nom de l'info (priorité autorisée) +
|
||||
3. ... |
|
||||
`+mon_info+` |
|
||||
link:weechat_plugin_api.fr.html#_hook_info[hook_info]
|
||||
|===
|
||||
|
||||
[[trigger_conditions]]
|
||||
@@ -3901,6 +3909,7 @@ du type de hook :
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
| info | tg_info | tg_info
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4215,6 +4224,20 @@ hachage :
|
||||
La table de hachage contient toutes les clés/valeurs de la table de hachage
|
||||
reçue (type : chaîne/chaîne).
|
||||
|
||||
[[trigger_data_info]]
|
||||
===== Info
|
||||
|
||||
La fonction de rappel "info" définit les variables suivantes dans la table de
|
||||
hachage :
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| tg_info_name | string | Nom de l'info.
|
||||
| tg_arguments | string | Paramètres.
|
||||
| tg_info | string | Chaîne vide (l'info à renvoyer).
|
||||
|===
|
||||
|
||||
[[trigger_examples]]
|
||||
==== Exemples
|
||||
|
||||
|
||||
@@ -3842,7 +3842,7 @@ List of default triggers:
|
||||
A trigger has the following options (names are
|
||||
`trigger.trigger.<name>.<option>`):
|
||||
|
||||
[width="100%",cols="2m,2,10",options="header"]
|
||||
[width="100%",cols="2m,3,10",options="header"]
|
||||
|===
|
||||
| Option | Values | Description
|
||||
|
||||
@@ -3851,7 +3851,7 @@ A trigger has the following options (names are
|
||||
any more.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
`command_run`, `timer`, `config`, `focus`, `info` |
|
||||
The hook used in trigger. For more information, see
|
||||
link:weechat_plugin_api.it.html#hooks[WeeChat plugin API reference / Hooks].
|
||||
|
||||
@@ -3902,7 +3902,8 @@ order, if triggers are globally enabled and if the trigger itself is enabled:
|
||||
. check trigger conditions: if false, exit
|
||||
. replace text in trigger using regular expression(s)
|
||||
. execute command(s)
|
||||
. exit with a return code (except for hooks _modifier_ and _focus_)
|
||||
. exit with a return code (except for hooks _modifier_, _line_, _focus_ and
|
||||
_info_)
|
||||
. perform post action (if different from `none`).
|
||||
|
||||
[[trigger_hook_arguments]]
|
||||
@@ -3998,6 +3999,13 @@ The arguments depend on the hook used. They are separated by semicolons.
|
||||
3. ... |
|
||||
`+buffer_nicklist+` |
|
||||
link:weechat_plugin_api.it.html#_hook_focus[hook_focus]
|
||||
|
||||
| info |
|
||||
1. info name (priority allowed) (required) +
|
||||
2. info name (priority allowed) +
|
||||
3. ... |
|
||||
`+my_info+` |
|
||||
link:weechat_plugin_api.en.html#_hook_info[hook_info]
|
||||
|===
|
||||
|
||||
[[trigger_conditions]]
|
||||
@@ -4044,6 +4052,7 @@ type:
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
| info | tg_info | tg_info
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4340,6 +4349,19 @@ The "focus" callback sets following variables in hashtable:
|
||||
The hashtable contains all keys/values from hashtable received (type:
|
||||
string/string).
|
||||
|
||||
[[trigger_data_info]]
|
||||
===== Info
|
||||
|
||||
The "info" callback sets following variables in hashtable:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| tg_info_name | string | Name of info.
|
||||
| tg_arguments | string | Arguments.
|
||||
| tg_info | string | Empty string (the info to return).
|
||||
|===
|
||||
|
||||
[[trigger_examples]]
|
||||
==== Examples
|
||||
|
||||
|
||||
@@ -3576,7 +3576,7 @@ WeeChat はデフォルトで 5
|
||||
トリガは以下のオプションをとります (名前は
|
||||
`trigger.trigger.<name>.<option>`):
|
||||
|
||||
[width="100%",cols="2m,2,10",options="header"]
|
||||
[width="100%",cols="2m,3,10",options="header"]
|
||||
|===
|
||||
| オプション | 値 | 説明
|
||||
|
||||
@@ -3585,7 +3585,7 @@ WeeChat はデフォルトで 5
|
||||
の場合、トリガは無効化され、アクションは実行されません。
|
||||
|
||||
| hook | `signal`、`hsignal`、`modifier`、`line`, `print`、`command`、
|
||||
`command_run`、`timer`、`config`、`focus` |
|
||||
`command_run`、`timer`、`config`、`focus`、`info` |
|
||||
トリガの中で使われるフック。より詳しい情報は
|
||||
link:weechat_plugin_api.ja.html#hooks[WeeChat プラグイン API リファレンス / フック]を参照してください。
|
||||
|
||||
@@ -3635,7 +3635,9 @@ trigger.trigger.beep.post_action = none
|
||||
. トリガ条件の確認: 偽の場合、終了
|
||||
. 正規表現を使ってトリガ内でテキスト置換
|
||||
. コマンドを実行
|
||||
. リターンコードを付けて終了 (_modifier_ と _focus_ フックの場合を除く)
|
||||
// TRANSLATION MISSING
|
||||
. exit with a return code (except for hooks _modifier_, _line_, _focus_ and
|
||||
_info_)
|
||||
. トリガ実行後の処遇を適用 (`none` 以外の場合)。
|
||||
|
||||
[[trigger_hook_arguments]]
|
||||
@@ -3731,6 +3733,14 @@ trigger.trigger.beep.post_action = none
|
||||
3. ... |
|
||||
`+buffer_nicklist+` |
|
||||
link:weechat_plugin_api.ja.html#_hook_focus[hook_focus]
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| info |
|
||||
1. info name (優先度の指定も可) (必須) +
|
||||
2. info name (優先度の指定も可) +
|
||||
3. ... |
|
||||
`+my_info+` |
|
||||
link:weechat_plugin_api.ja.html#_hook_info[hook_info]
|
||||
|===
|
||||
|
||||
[[trigger_conditions]]
|
||||
@@ -3776,6 +3786,7 @@ _var_
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
| info | tg_info | tg_info
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4070,6 +4081,20 @@ _weechat_print_ 修飾子では、メッセージタグを使う変数 (下の
|
||||
ハッシュテーブルには受け取ったハッシュテーブルに含まれる全てのキーおよび値 (型:
|
||||
string/string) が含まれています。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[trigger_data_info]]
|
||||
===== Info
|
||||
|
||||
"info" コールバックは以下の変数をハッシュテーブルに格納します:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| 変数 | 型 | 説明
|
||||
| tg_info_name | string | Name of info.
|
||||
| tg_arguments | string | Arguments.
|
||||
| tg_info | string | Empty string (the info to return).
|
||||
|===
|
||||
|
||||
[[trigger_examples]]
|
||||
==== 例
|
||||
|
||||
|
||||
@@ -3612,7 +3612,7 @@ Lista domyśłnych triggerów:
|
||||
|
||||
Trigger posiada następujące opcje (nazwy to `trigger.trigger.<nazwa>.<opcja>`):
|
||||
|
||||
[width="100%",cols="2m,2,10",options="header"]
|
||||
[width="100%",cols="2m,3,10",options="header"]
|
||||
|===
|
||||
| Opcja | Wartość | Opis
|
||||
|
||||
@@ -3621,7 +3621,7 @@ Trigger posiada następujące opcje (nazwy to `trigger.trigger.<nazwa>.<opcja>`)
|
||||
więcej wykonywane.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
`command_run`, `timer`, `config`, `focus`, `info` |
|
||||
Zdarzenia używane przez trigger. Więcej informacji można znaleźć w
|
||||
link:weechat_plugin_api.en.html#hooks[WeeChat Plugin API Reference / Hooks] (Angielski).
|
||||
|
||||
@@ -3672,7 +3672,9 @@ kolejności, jeśli triggery są globalnie włączone i jeśli sam trigger jest
|
||||
. sprawdzenie warunków triggera: jeśli nie jest spełniony następuje wyjście
|
||||
. zastępowanie tekstu w triggerze za pomocą wyrażenia
|
||||
. wykonanie komend(-y)
|
||||
. wyjście ze zwróceniem kodu (za wyjątkiem uchwytów _modifier_ i _focus_)
|
||||
// TRANSLATION MISSING
|
||||
. exit with a return code (except for hooks _modifier_, _line_, _focus_ and
|
||||
_info_)
|
||||
. wykonanie akcji kończącej (jeśli inna niż `none`).
|
||||
|
||||
[[trigger_hook_arguments]]
|
||||
@@ -3768,6 +3770,14 @@ Argumenty zależą od rodzaju uchwytu. Są oddzielane średnikami.
|
||||
3. ... |
|
||||
`+buffer_nicklist+` |
|
||||
link:weechat_plugin_api.en.html#_hook_focus[hook_focus] (Angielski)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| info |
|
||||
1. info name (dozwolony priorytet) (wymagane) +
|
||||
2. info name (dozwolony priorytet) +
|
||||
3. ... |
|
||||
`+my_info+` |
|
||||
link:weechat_plugin_api.en.html#_hook_info[hook_info] (Angielski)
|
||||
|===
|
||||
|
||||
[[trigger_conditions]]
|
||||
@@ -3814,6 +3824,7 @@ od typu uchwytu:
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
| info | tg_info | tg_info
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -4108,6 +4119,20 @@ Callback "focus" ustawia następujące zmienne w tablicy hashy:
|
||||
Tablica zawiera wszystkie klucze/wartości z otrzymanej tablicy hashy (typ:
|
||||
ciąg/ciąg).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[trigger_data_info]]
|
||||
===== Info
|
||||
|
||||
Callback "info" ustawia następujące zmienne w tablicy hashy:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Zmienna | Typ | Opis
|
||||
| tg_info_name | string | Name of info.
|
||||
| tg_arguments | string | Arguments.
|
||||
| tg_info | string | Empty string (the info to return).
|
||||
|===
|
||||
|
||||
[[trigger_examples]]
|
||||
==== Przykłady
|
||||
|
||||
|
||||
Reference in New Issue
Block a user