mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:33:02 +01:00
some minor fixes
This commit is contained in:
parent
bc4e089a65
commit
26d561eb77
@ -232,7 +232,7 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int friendnumber, uint8_
|
|||||||
if (tox_getname(m, friendnumber, name) == -1)
|
if (tox_getname(m, friendnumber, name) == -1)
|
||||||
return;
|
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();
|
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);
|
int n = add_group_request(group_pub_key, friendnumber);
|
||||||
|
|
||||||
if (n == -1) {
|
if (n == -1) {
|
||||||
wprintw(ctx->history, "Something bad happened.\n");
|
wprintw(ctx->history, "Something bad happened. Discarding invite.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "toxic_windows.h"
|
#include "toxic_windows.h"
|
||||||
#include "misc_tools.h"
|
#include "misc_tools.h"
|
||||||
#include "execute.h"
|
|
||||||
|
|
||||||
extern uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE];
|
extern uint8_t pending_grp_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE];
|
||||||
|
|
||||||
|
@ -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 */
|
/* 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,
|
static int do_command(WINDOW *w, ToxWindow *prompt, Tox *m, int num_args, int num_cmds,
|
||||||
int num_cmds, struct cmd_func *commands, char (*args)[MAX_STR_SIZE])
|
struct cmd_func *commands, char (*args)[MAX_STR_SIZE])
|
||||||
{
|
{
|
||||||
int i;
|
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)
|
if (do_command(w, prompt, m, num_args, GLOBAL_NUM_COMMANDS, global_commands, args) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
wprintw(w, "Invalid command.\n");
|
wprintw(w, "Invalid command.\n");
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "toxic_windows.h"
|
#include "toxic_windows.h"
|
||||||
#include "misc_tools.h"
|
#include "misc_tools.h"
|
||||||
#include "execute.h"
|
|
||||||
|
|
||||||
extern char *DATA_FILE;
|
extern char *DATA_FILE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user