summaryrefslogtreecommitdiff
path: root/toxcore/group.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/group.c')
-rw-r--r--toxcore/group.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/toxcore/group.c b/toxcore/group.c
index 3e04f181..a946e7b8 100644
--- a/toxcore/group.c
+++ b/toxcore/group.c
@@ -1301,36 +1301,6 @@ int group_set_max_frozen(const Group_Chats *g_c, uint32_t groupnumber, uint32_t
1301 return 0; 1301 return 0;
1302} 1302}
1303 1303
1304/* List all the (frozen, if frozen is true) peers in the group chat.
1305 *
1306 * Copies the names of the peers to the `name[length][MAX_NAME_LENGTH]` array.
1307 *
1308 * Copies the lengths of the names to `lengths[length]`
1309 *
1310 * returns the number of peers on success.
1311 *
1312 * return -1 on failure.
1313 */
1314int group_names(const Group_Chats *g_c, uint32_t groupnumber, uint8_t names[][MAX_NAME_LENGTH], uint16_t lengths[],
1315 uint16_t length, bool frozen)
1316{
1317 const Group_c *g = get_group_c(g_c, groupnumber);
1318
1319 if (!g) {
1320 return -1;
1321 }
1322
1323 const uint32_t num = frozen ? g->numfrozen : g->numpeers;
1324
1325 unsigned int i;
1326
1327 for (i = 0; i < num && i < length; ++i) {
1328 lengths[i] = group_peername(g_c, groupnumber, i, names[i], frozen);
1329 }
1330
1331 return i;
1332}
1333
1334/* Return the number of (frozen, if frozen is true) peers in the group chat on 1304/* Return the number of (frozen, if frozen is true) peers in the group chat on
1335 * success. 1305 * success.
1336 * return -1 if groupnumber is invalid. 1306 * return -1 if groupnumber is invalid.