diff options
author | stfn <stfnmd@gmail.com> | 2013-01-20 17:02:10 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-01-20 17:02:10 +0100 |
commit | 2dea08aba8147a5d77dc3863fc53da40aefa23e4 (patch) | |
tree | ddf87067be013618e4f709a9fd7200319804b479 /doc/it | |
parent | 5f7733c4a77595333f9457befdf3f37fccfed541 (diff) | |
download | weechat-2dea08aba8147a5d77dc3863fc53da40aefa23e4.zip |
doc: fix examples of function weechat_hook_connect (plugin API reference)
Diffstat (limited to 'doc/it')
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index 2f42f8798..d028a0ade 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -7360,8 +7360,8 @@ Esempio in C: [source,C] ---------------------------------------- int -my_connect_cb (void *data, int status, int gnutls_rc, const char *error, - const char *ip_address) +my_connect_cb (void *data, int status, int gnutls_rc, int sock, + const char *error, const char *ip_address) { switch (status) { @@ -7404,7 +7404,7 @@ my_connect_cb (void *data, int status, int gnutls_rc, const char *error, struct t_hook *my_connect_hook = weechat_hook_connect (NULL, "my.server.org", 1234, - sock, 0, + 1, 0, NULL, NULL, 0, /* GnuTLS */ NULL, &my_connect_cb, NULL); @@ -7415,11 +7415,11 @@ Script (Python): [source,python] ---------------------------------------- # prototipo -hook = weechat.hook_connect(proxy, address, port, sock, ipv6, local_hostname, +hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname, callback, callback_data) # esempio -def my_connect_cb(data, status, gnutls_rc, error, ip_address): +def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address): if status == WEECHAT_HOOK_CONNECT_OK: # ... elif status == WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND: @@ -7444,7 +7444,7 @@ def my_connect_cb(data, status, gnutls_rc, error, ip_address): # ... return weechat.WEECHAT_RC_OK -hook = weechat.hook_connect("", "my.server.org", 1234, sock, 0, "", +hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "", "my_connect_cb", "") ---------------------------------------- |