Tweaked command /tox, added completion.

This commit is contained in:
Håvard Pettersson 2014-09-19 17:03:10 +02:00
parent 9810bf14d9
commit d4ea20b555
2 changed files with 11 additions and 7 deletions

View File

@ -559,7 +559,7 @@ tox_weechat_cmd_tox(void *data, struct t_gui_buffer *buffer,
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];
@ -672,12 +672,16 @@ tox_weechat_commands_init()
weechat_hook_command("tox",
"manage Tox identities",
"list"
" || add <name>"
" || del <name>"
" || create <name>"
" || delete <name>"
" || connect <name>",
" list: list all Tox identity\n"
" add: create a new Tox identity\n"
" del: delete a Tox identity\n"
" create: create a new Tox identity\n"
" delete: delete a Tox identity\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);
}

View File

@ -29,7 +29,7 @@ tox_weechat_completion_identity(void *data,
void
tox_weechat_completion_init()
{
weechat_hook_completion("tox_identity",
weechat_hook_completion("tox_identities",
"identity",
tox_weechat_completion_identity, NULL);
}