From 52a3367b5e54fe37ca7cb179ad6b807311a41b87 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Mon, 1 Jun 2015 03:12:12 -0400 Subject: [PATCH] small API fix --- src/group_commands.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/group_commands.c b/src/group_commands.c index c48f2d9..0c68e88 100644 --- a/src/group_commands.c +++ b/src/group_commands.c @@ -149,12 +149,14 @@ void cmd_mod(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX void cmd_prune(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE]) { - if (tox_group_prune_moderator_list(m, self->num) == -1) { + int num_pruned = tox_group_prune_moderator_list(m, self->num); + + if (num_pruned == -1) { line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to prune moderator list."); return; } - line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Moderator list has been successfully pruned."); + line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "%d offline moderators have been pruned from the list.", num_pruned); } void cmd_unmod(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])