mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-15 08:03:01 +01:00
Group API changes
This commit is contained in:
parent
15ef50e46c
commit
8e23ce1b83
@ -135,7 +135,7 @@ void cmd_ban(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t ban_list[num_banned];
|
uint32_t ban_list[num_banned];
|
||||||
|
|
||||||
if (!tox_group_ban_get_list(m, self->num, ban_list, &err)) {
|
if (!tox_group_ban_get_list(m, self->num, ban_list, &err)) {
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to get the ban list (error %d).", err);
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to get the ban list (error %d).", err);
|
||||||
@ -145,7 +145,7 @@ void cmd_ban(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX
|
|||||||
uint16_t i;
|
uint16_t i;
|
||||||
|
|
||||||
for (i = 0; i < num_banned; ++i) {
|
for (i = 0; i < num_banned; ++i) {
|
||||||
uint16_t id = ban_list[i];
|
uint32_t id = ban_list[i];
|
||||||
size_t len = tox_group_ban_get_name_size(m, self->num, id, &err);
|
size_t len = tox_group_ban_get_name_size(m, self->num, id, &err);
|
||||||
|
|
||||||
if (err != TOX_ERR_GROUP_BAN_QUERY_OK) {
|
if (err != TOX_ERR_GROUP_BAN_QUERY_OK) {
|
||||||
|
@ -538,8 +538,8 @@ static void groupchat_onGroupPeerlistUpdate(ToxWindow *self, Tox *m, uint32_t gr
|
|||||||
name_length = MIN(name_length, TOX_MAX_NAME_LENGTH - 1);
|
name_length = MIN(name_length, TOX_MAX_NAME_LENGTH - 1);
|
||||||
|
|
||||||
if (!tox_group_peer_get_name(m, groupnum, i, (uint8_t *) chat->peer_list[i].name, NULL)) {
|
if (!tox_group_peer_get_name(m, groupnum, i, (uint8_t *) chat->peer_list[i].name, NULL)) {
|
||||||
chat->peer_list[i].name_length = strlen(UNKNOWN_NAME);
|
name_length = strlen(UNKNOWN_NAME);
|
||||||
memcpy(chat->peer_list[i].name, UNKNOWN_NAME, chat->peer_list[i].name_length);
|
memcpy(chat->peer_list[i].name, UNKNOWN_NAME, name_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
chat->peer_list[i].name[name_length] = '\0';
|
chat->peer_list[i].name[name_length] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user