1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-15 04:53:02 +01:00

a couple fixes

This commit is contained in:
Jfreegman 2015-01-04 17:22:24 -05:00
parent 26dda8dbf9
commit b3ab0bde05
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 5 additions and 3 deletions

View File

@ -400,12 +400,14 @@ void cmd_join(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MA
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.");
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.");
tox_group_delete(m, self->num, NULL, 0);
return;

View File

@ -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);
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];
snprintf(tmp_event, sizeof(tmp_event), "set topic to %s", topic);