mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-15 06:03:01 +01:00
remove obsolete prune command
This commit is contained in:
parent
9cd2158c72
commit
b36ada0f5b
@ -93,7 +93,6 @@ static struct cmd_func group_commands[] = {
|
|||||||
{ "/passwd", cmd_set_passwd },
|
{ "/passwd", cmd_set_passwd },
|
||||||
{ "/peerlimit", cmd_set_peerlimit },
|
{ "/peerlimit", cmd_set_peerlimit },
|
||||||
{ "/privacy", cmd_set_privacy },
|
{ "/privacy", cmd_set_privacy },
|
||||||
{ "/prune", cmd_prune },
|
|
||||||
{ "/rejoin", cmd_rejoin },
|
{ "/rejoin", cmd_rejoin },
|
||||||
{ "/silence", cmd_silence },
|
{ "/silence", cmd_silence },
|
||||||
{ "/topic", cmd_set_topic },
|
{ "/topic", cmd_set_topic },
|
||||||
|
@ -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);
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 1, BLUE, "You have promoted %s to moderator.", nick);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case -1: {
|
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to promote peer to moderator");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case -2: {
|
case -2: {
|
||||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "You do not have permission to promote moderators.");
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "You do not have permission to promote moderators.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case -3: {
|
default: {
|
||||||
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.");
|
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Failed to promote peer to moderator");
|
||||||
return;
|
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])
|
void cmd_unmod(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||||
{
|
{
|
||||||
if (argc < 1) {
|
if (argc < 1) {
|
||||||
|
@ -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);
|
line_info_add(self, timefrmt, NULL, NULL, SYS_MSG, 1, RED, "-!- %s has been banned by %s", tgt_name, src_name);
|
||||||
break;
|
break;
|
||||||
case TOX_GROUP_MOD_EVENT_OBSERVER:
|
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;
|
break;
|
||||||
case TOX_GROUP_MOD_EVENT_USER:
|
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;
|
break;
|
||||||
case TOX_GROUP_MOD_EVENT_MODERATOR:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user