diff --git a/src/chat.c b/src/chat.c index e5f97a1..2c1b83f 100644 --- a/src/chat.c +++ b/src/chat.c @@ -232,7 +232,7 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int friendnumber, uint8_ if (tox_getname(m, friendnumber, name) == -1) return; - wprintw(ctx->history, "Group chat invite from %s.\n", name); + wprintw(ctx->history, "%s has invited you to a group chat.\n", name); int ngc = get_num_groupchats(); @@ -244,7 +244,7 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int friendnumber, uint8_ int n = add_group_request(group_pub_key, friendnumber); if (n == -1) { - wprintw(ctx->history, "Something bad happened.\n"); + wprintw(ctx->history, "Something bad happened. Discarding invite.\n"); return; } diff --git a/src/chat_commands.c b/src/chat_commands.c index a5bf1be..39737e1 100644 --- a/src/chat_commands.c +++ b/src/chat_commands.c @@ -11,7 +11,6 @@ #include "toxic_windows.h" #include "misc_tools.h" -#include "execute.h" extern uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE]; diff --git a/src/execute.c b/src/execute.c index b0551bf..4069622 100644 --- a/src/execute.c +++ b/src/execute.c @@ -78,8 +78,8 @@ static int parse_command(WINDOW *w, char *cmd, char (*args)[MAX_STR_SIZE]) } /* Matches command to respective function. Returns 0 on match, 1 on no match */ -static int do_command(WINDOW *w, ToxWindow *prompt, Tox *m, int num_args, - int num_cmds, struct cmd_func *commands, char (*args)[MAX_STR_SIZE]) +static int do_command(WINDOW *w, ToxWindow *prompt, Tox *m, int num_args, int num_cmds, + struct cmd_func *commands, char (*args)[MAX_STR_SIZE]) { int i; @@ -119,6 +119,5 @@ void execute(WINDOW *w, ToxWindow *prompt, Tox *m, char *cmd, int mode) if (do_command(w, prompt, m, num_args, GLOBAL_NUM_COMMANDS, global_commands, args) == 0) return; - wprintw(w, "Invalid command.\n"); } diff --git a/src/global_commands.c b/src/global_commands.c index a5391ac..76c17d0 100644 --- a/src/global_commands.c +++ b/src/global_commands.c @@ -11,7 +11,6 @@ #include "toxic_windows.h" #include "misc_tools.h" -#include "execute.h" extern char *DATA_FILE;