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

remove obsolete prune command

This commit is contained in:
Jfreegman 2015-06-04 16:46:30 -04:00
parent 9cd2158c72
commit b36ada0f5b
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
3 changed files with 5 additions and 22 deletions

View File

@ -93,7 +93,6 @@ static struct cmd_func group_commands[] = {
{ "/passwd", cmd_set_passwd },
{ "/peerlimit", cmd_set_peerlimit },
{ "/privacy", cmd_set_privacy },
{ "/prune", cmd_prune },
{ "/rejoin", cmd_rejoin },
{ "/silence", cmd_silence },
{ "/topic", cmd_set_topic },

View File

@ -205,33 +205,17 @@ void cmd_mod(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 1, BLUE, "You have promoted %s to moderator.", nick);
return;
}
case -1: {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to promote peer to moderator");
return;
}
case -2: {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "You do not have permission to promote moderators.");
return;
}
case -3: {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Moderator list is full. Use the \"/prune\" command to remove all offline mods from the mod list.");
default: {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to promote peer to moderator");
return;
}
}
}
void cmd_prune(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
{
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, "%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])
{
if (argc < 1) {

View File

@ -604,13 +604,13 @@ static void groupchat_onGroupModeration(ToxWindow *self, Tox *m, int groupnum, u
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, RED, "-!- %s has been banned by %s", tgt_name, src_name);
break;
case TOX_GROUP_MOD_EVENT_OBSERVER:
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, BLUE, "-!- %s has been silenced by %s", tgt_name, src_name);
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, BLUE, "-!- %s has set %s's role to observer", src_name, tgt_name);
break;
case TOX_GROUP_MOD_EVENT_USER:
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, BLUE, "-!- %s has been made a normal user by %s", tgt_name, src_name);
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, BLUE, "-!- %s has set %s's role to user", src_name, tgt_name);
break;
case TOX_GROUP_MOD_EVENT_MODERATOR:
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, BLUE, "-!- %s has been promoted to moderator by %s", tgt_name, src_name);
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, BLUE, "-!- %s has set %s's role to moderator", src_name, tgt_name);
break;
default:
return;