mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 13:26:21 +00:00
Added /room <role> command
This commit is contained in:
@@ -1228,6 +1228,9 @@ cmd_init(void)
|
||||
autocomplete_add(room_ac, "destroy");
|
||||
autocomplete_add(room_ac, "config");
|
||||
autocomplete_add(room_ac, "info");
|
||||
autocomplete_add(room_ac, "moderators");
|
||||
autocomplete_add(room_ac, "participants");
|
||||
autocomplete_add(room_ac, "visitors");
|
||||
|
||||
form_ac = autocomplete_new();
|
||||
autocomplete_add(form_ac, "submit");
|
||||
|
||||
@@ -2063,6 +2063,9 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
||||
if ((g_strcmp0(args[0], "accept") != 0) &&
|
||||
(g_strcmp0(args[0], "destroy") != 0) &&
|
||||
(g_strcmp0(args[0], "config") != 0) &&
|
||||
(g_strcmp0(args[0], "moderators") != 0) &&
|
||||
(g_strcmp0(args[0], "participants") != 0) &&
|
||||
(g_strcmp0(args[0], "visitors") != 0) &&
|
||||
(g_strcmp0(args[0], "info") != 0)) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
@@ -2082,6 +2085,21 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "moderators") == 0) {
|
||||
ui_show_room_role_list(window, room, MUC_ROLE_MODERATOR);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "participants") == 0) {
|
||||
ui_show_room_role_list(window, room, MUC_ROLE_PARTICIPANT);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "visitors") == 0) {
|
||||
ui_show_room_role_list(window, room, MUC_ROLE_VISITOR);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "accept") == 0) {
|
||||
gboolean requires_config = muc_requires_config(room);
|
||||
if (!requires_config) {
|
||||
|
||||
Reference in New Issue
Block a user