1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 06:56:44 +02:00

split lists up so only commands that work in given window autocomplete

This commit is contained in:
Jfreegman
2013-12-09 17:56:20 -05:00
parent 674aa682e7
commit 4065715b78
6 changed files with 51 additions and 30 deletions

View File

@ -39,28 +39,6 @@ static struct cmd_func chat_commands[] = {
{ "/sendfile", cmd_sendfile },
};
/* Array of all command names; used for tab completion. */
const uint8_t cmd_list[TOT_NUM_COMMANDS][MAX_CMDNAME_SIZE] = {
{ "/accept" },
{ "/add" },
{ "/clear" },
{ "/connect" },
{ "/exit" },
{ "/groupchat" },
{ "/help" },
{ "/invite" },
{ "/join" },
{ "/myid" },
{ "/nick" },
{ "/note" },
{ "/q" },
{ "/quit" },
{ "/savefile" },
{ "/sendfile" },
{ "/status" },
};
/* Parses input command and puts args into arg array.
Returns number of arguments on success, -1 on failure. */
static int parse_command(WINDOW *w, char *cmd, char (*args)[MAX_STR_SIZE])