summaryrefslogtreecommitdiff
path: root/doc/it
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-04-24 21:37:38 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-04-24 22:09:15 +0200
commitb7f3127bf81d53ea51a4147bb6ae3b7edcff2acd (patch)
tree1abcf4b64fd9f6c73e75da4a4079a31a97b2812b /doc/it
parentf69ef840e0baa40456eda6dcad43e2ec26c7a968 (diff)
downloadweechat-b7f3127bf81d53ea51a4147bb6ae3b7edcff2acd.zip
api: allow to catch multiple signals in functions hook_signal and hook_hsignal (closes #1780)
Diffstat (limited to 'doc/it')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc20
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 87f05262b..20b606fc7 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -10610,7 +10610,7 @@ hook = weechat.hook_print("", "", "", 1, "my_print_cb", "")
==== hook_signal
// TRANSLATION MISSING
-_Updated in 1.5._
+_Updated in 1.5, 3.6._
Hook su un segnale.
@@ -10631,7 +10631,8 @@ struct t_hook *weechat_hook_signal (const char *signal,
Argomenti:
// TRANSLATION MISSING
-* _signal_: segnale da catturare, wildcard `+*+` is allowed
+* _signal_: segnale da catturare, wildcard `+*+` is allowed, multiple signals
+ can be separated by semi-colons
(priorità consentita, consultare la nota riguardo la
<<hook_priority,priority>>), see table below
* _callback_: funzione chiamata a segnale ricevuto, argomenti e valore
@@ -11402,6 +11403,7 @@ List of signals sent by WeeChat and plugins:
Esempio in C:
+// TRANSLATION MISSING
[source,c]
----
int
@@ -11412,13 +11414,14 @@ my_signal_cb (const void *pointer, void *data, const char *signal,
return WEECHAT_RC_OK;
}
-/* cattura il segnale "quit" */
-struct t_hook *my_signal_hook = weechat_hook_signal ("quit",
+/* catch signals "quit" and "upgrade" */
+struct t_hook *my_signal_hook = weechat_hook_signal ("quit;upgrade",
&my_signal_cb, NULL, NULL);
----
Script (Python):
+// TRANLSATION MISSING
[source,python]
----
# prototipo
@@ -11429,8 +11432,8 @@ def my_signal_cb(data, signal, signal_data):
# ...
return weechat.WEECHAT_RC_OK
-# cattura il segnale "quit"
-hook = weechat.hook_signal("quit", "my_signal_cb", "")
+# catch signals "quit" and "upgrade"
+hook = weechat.hook_signal("quit;upgrade", "my_signal_cb", "")
----
==== hook_signal_send
@@ -11648,7 +11651,7 @@ weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING,
==== hook_hsignal
-_WeeChat ≥ 0.3.4, updated in 1.5._
+_WeeChat ≥ 0.3.4, updated in 1.5, 3.6._
Hook su hsignal (segnale con tabella hash).
@@ -11668,7 +11671,8 @@ struct t_hook *weechat_hook_hsignal (const char *signal,
Argomenti:
// TRANSLATION MISSING
-* _signal_: segnale da catturare, wildcard `+*+` is allowed
+* _signal_: segnale da catturare, wildcard `+*+` is allowed, multiple signals can
+ be separated by semi-colons
(priorità consentita, consultare la nota a proposito di <<hook_priority,priority>>),
see table below
* _callback_: funzione chiamata a segnale ricevuto, argomenti e valore