doc: update examples of function hook_command_run (plugin API reference)

v2.8-utf8proc
Sébastien Helleu 2015-12-17 08:13:55 +01:00
parent f74aa09573
commit 0509f19048
4 changed files with 8 additions and 12 deletions

View File

@ -7179,8 +7179,7 @@ int
my_command_run_cb (void *data, struct t_gui_buffer *buffer,
const char *command)
{
weechat_printf (NULL,
"You want to complete? I'm eating the completion ahah!");
weechat_printf (NULL, "I'm eating the completion!");
return WEECHAT_RC_OK_EAT;
}
@ -7198,7 +7197,7 @@ hook = weechat.hook_command_run(command, callback, callback_data)
# example
def my_command_run_cb(data, buffer, command):
weechat.prnt("", "You want to complete? I'm eating the completion, ahah!")
weechat.prnt("", "I'm eating the completion!")
return weechat.WEECHAT_RC_OK_EAT
hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "")

View File

@ -7299,8 +7299,7 @@ Exemple en C :
int
my_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command)
{
weechat_printf (NULL,
"Vous voulez compléter ? Je mange la commande, ahah !");
weechat_printf (NULL, "Je mange la complétion !");
return WEECHAT_RC_OK_EAT;
}
@ -7318,7 +7317,7 @@ hook = weechat.hook_command_run(command, callback, callback_data)
# exemple
def my_command_run_cb(data, buffer, command):
weechat.prnt("", "Vous voulez compléter ? Je mange la commande, ahah !")
weechat.prnt("", "Je mange la complétion !")
return weechat.WEECHAT_RC_OK_EAT
hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "")

View File

@ -7343,8 +7343,7 @@ int
my_command_run_cb (void *data, struct t_gui_buffer *buffer,
const char *command)
{
weechat_printf (NULL,
"Vuoi completare? Sto mangiando il completamento, ahah!);
weechat_printf (NULL, "Sto mangiando il completamento!");
return WEECHAT_RC_OK_EAT;
}
@ -7362,7 +7361,7 @@ hook = weechat.hook_command_run(command, callback, callback_data)
# esempio
def my_command_run_cb(data, buffer, command):
weechat.prnt("". "Vuoi completare? Sto mangiando il completamento, ahah!")
weechat.prnt("", "Sto mangiando il completamento!")
return weechat.WEECHAT_RC_OK_EAT
hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "")

View File

@ -7178,8 +7178,7 @@ int
my_command_run_cb (void *data, struct t_gui_buffer *buffer,
const char *command)
{
weechat_printf (NULL,
"You want to complete? I'm eating the completion ahah!");
weechat_printf (NULL, "I'm eating the completion!");
return WEECHAT_RC_OK_EAT;
}
@ -7197,7 +7196,7 @@ hook = weechat.hook_command_run(command, callback, callback_data)
# 例
def my_command_run_cb(data, buffer, command):
weechat.prnt("", "You want to complete? I'm eating the completion, ahah!")
weechat.prnt("", "I'm eating the completion!")
return weechat.WEECHAT_RC_OK_EAT
hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "")