summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.asciidoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-11-22 08:14:29 +0100
committerSébastien Helleu <flashcode@flashtux.org>2014-11-22 08:14:29 +0100
commit1ef3237b6b2f7ed07faccc0c1ab897f37827421d (patch)
treeb236f04b6efcd49667a389362030fb4dd4b0cb24 /doc/it/weechat_plugin_api.it.asciidoc
parente253a2509ae648a358991103fafbd18d21bb06cd (diff)
downloadweechat-1ef3237b6b2f7ed07faccc0c1ab897f37827421d.zip
api: return value in function command(), remove WeeChat error after command callback if return code is WEECHAT_RC_ERROR
Diffstat (limited to 'doc/it/weechat_plugin_api.it.asciidoc')
-rw-r--r--doc/it/weechat_plugin_api.it.asciidoc17
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc
index 01318a8a2..b7367d5c6 100644
--- a/doc/it/weechat_plugin_api.it.asciidoc
+++ b/doc/it/weechat_plugin_api.it.asciidoc
@@ -12838,13 +12838,16 @@ Funzioni per eseguire comandi di WeeChat.
==== weechat_command
+// TRANSLATION MISSING
+_Updated in 1.1._
+
Esegue un comando.
Prototipo:
[source,C]
----
-void weechat_command (struct t_gui_buffer *buffer, const char *command);
+int weechat_command (struct t_gui_buffer *buffer, const char *command);
----
Argomenti:
@@ -12854,12 +12857,18 @@ Argomenti:
* 'command': comando da eseguire (se preceduto da "/"), oppure il testo
viene inviato sul buffer
+Valori restituiti: (_WeeChat ≥ 1.1_)
+
+* 'WEECHAT_RC_OK' se l'operazione ha successo
+* 'WEECHAT_RC_ERROR' se c'è un errore
+
Esempio in C:
[source,C]
----
-weechat_command (weechat_buffer_search ("irc", "freenode.#weechat"),
- "/whois FlashCode");
+int rc;
+rc = weechat_command (weechat_buffer_search ("irc", "freenode.#weechat"),
+ "/whois FlashCode");
----
Script (Python):
@@ -12870,7 +12879,7 @@ Script (Python):
weechat.command(buffer, command)
# esempio
-weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode")
+rc = weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode")
----
[[network]]