Tweaked command /tox, added completion.
This commit is contained in:
parent
9810bf14d9
commit
d4ea20b555
@ -559,7 +559,7 @@ tox_weechat_cmd_tox(void *data, struct t_gui_buffer *buffer,
|
|||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (argc == 3 && (weechat_strcasecmp(argv[1], "add") == 0))
|
else if (argc == 3 && (weechat_strcasecmp(argv[1], "create") == 0))
|
||||||
{
|
{
|
||||||
char *name = argv[2];
|
char *name = argv[2];
|
||||||
|
|
||||||
@ -672,12 +672,16 @@ tox_weechat_commands_init()
|
|||||||
weechat_hook_command("tox",
|
weechat_hook_command("tox",
|
||||||
"manage Tox identities",
|
"manage Tox identities",
|
||||||
"list"
|
"list"
|
||||||
" || add <name>"
|
" || create <name>"
|
||||||
" || del <name>"
|
" || delete <name>"
|
||||||
" || connect <name>",
|
" || connect <name>",
|
||||||
" list: list all Tox identity\n"
|
" list: list all Tox identity\n"
|
||||||
" add: create a new Tox identity\n"
|
" create: create a new Tox identity\n"
|
||||||
" del: delete a Tox identity\n"
|
" delete: delete a Tox identity\n"
|
||||||
"connect: connect a Tox identity to the network\n",
|
"connect: connect a Tox identity to the network\n",
|
||||||
NULL, tox_weechat_cmd_tox, NULL);
|
"list"
|
||||||
|
" || add"
|
||||||
|
" || delete %(tox_identities)"
|
||||||
|
" || connect %(tox_identities)",
|
||||||
|
tox_weechat_cmd_tox, NULL);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ tox_weechat_completion_identity(void *data,
|
|||||||
void
|
void
|
||||||
tox_weechat_completion_init()
|
tox_weechat_completion_init()
|
||||||
{
|
{
|
||||||
weechat_hook_completion("tox_identity",
|
weechat_hook_completion("tox_identities",
|
||||||
"identity",
|
"identity",
|
||||||
tox_weechat_completion_identity, NULL);
|
tox_weechat_completion_identity, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user