mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-15 06:33:01 +01:00
a couple fixes
This commit is contained in:
parent
26dda8dbf9
commit
b3ab0bde05
@ -400,12 +400,14 @@ void cmd_join(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MA
|
|||||||
id_bin[i] = x;
|
id_bin[i] = x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tox_group_new_join(m, (uint8_t *) id_bin) == -1) {
|
int groupnum = tox_group_new_join(m, (uint8_t *) id_bin);
|
||||||
|
|
||||||
|
if (groupnum == -1) {
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Group chat instance failed to initialize.");
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Group chat instance failed to initialize.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init_groupchat_win(prompt, m, self->num, NULL, 0) == -1) {
|
if (init_groupchat_win(prompt, m, groupnum, NULL, 0) == -1) {
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Group chat window failed to initialize.");
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Group chat window failed to initialize.");
|
||||||
tox_group_delete(m, self->num, NULL, 0);
|
tox_group_delete(m, self->num, NULL, 0);
|
||||||
return;
|
return;
|
||||||
|
@ -67,7 +67,7 @@ void cmd_set_topic(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
|
|||||||
int sn_len = tox_group_get_self_name(m, self->num, (uint8_t *) selfnick);
|
int sn_len = tox_group_get_self_name(m, self->num, (uint8_t *) selfnick);
|
||||||
selfnick[sn_len] = '\0';
|
selfnick[sn_len] = '\0';
|
||||||
|
|
||||||
line_info_add(self, timefrmt, selfnick, NULL, NAME_CHANGE, 0, 0, " set the group topic to: %s", topic);
|
line_info_add(self, timefrmt, selfnick, NULL, SYS_MSG, 0, 0, " set the group topic to: %s", topic);
|
||||||
|
|
||||||
char tmp_event[MAX_STR_SIZE];
|
char tmp_event[MAX_STR_SIZE];
|
||||||
snprintf(tmp_event, sizeof(tmp_event), "set topic to %s", topic);
|
snprintf(tmp_event, sizeof(tmp_event), "set topic to %s", topic);
|
||||||
|
Loading…
Reference in New Issue
Block a user