diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-05-10 08:26:56 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-05-10 08:26:56 +0200 |
commit | cdab55aa0552356173815cfc79a7b9ddc0a435ed (patch) | |
tree | 9b833e42e2552477b60520259a12c4ba06fa42b3 /doc/it | |
parent | 6d205222aa80d623b8f0f13514bd7046eea42f00 (diff) | |
download | weechat-cdab55aa0552356173815cfc79a7b9ddc0a435ed.zip |
api: change type of arguments displayed/highlight in hook_print callback from string to integer (in scripts)
Diffstat (limited to 'doc/it')
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index 2c9aaa0c4..9e8798678 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -7682,6 +7682,9 @@ hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "", ==== weechat_hook_print +// TRANSLATION MISSING +_Updated in 0.4.3 and 1.0._ + Hook su un messaggio stampato. Prototipo: @@ -7741,6 +7744,13 @@ Valore restituito: * puntatore al nuovo hook, NULL in caso di errore +// TRANSLATION MISSING +[IMPORTANT] +In scripts, with WeeChat ≥ 1.0, the callback arguments 'displayed' and +'highlight' are integers (with WeeChat ≤ 0.4.3, they were strings). + +To be compatible with all versions, it is recommended to convert the argument +to integer before testing it, for example in Python: "`if int(highlight):`". + Esempio in C: [source,C] @@ -7769,7 +7779,8 @@ hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callbac # esempio def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message): - # ... + if int(highlight): + # ... return weechat.WEECHAT_RC_OK # cattura tutti i messaggi, su tutti i buffer, senza colore |