aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_ac.c24
-rw-r--r--src/command/cmd_defs.c6
-rw-r--r--src/command/cmd_funcs.c5
3 files changed, 25 insertions, 10 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index 40c8d7ed..a2d949eb 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -206,7 +206,8 @@ static Autocomplete rooms_list_ac;
static Autocomplete rooms_cache_ac;
static Autocomplete affiliation_ac;
static Autocomplete role_ac;
-static Autocomplete privilege_cmd_ac;
+static Autocomplete affiliation_cmd_ac;
+static Autocomplete role_cmd_ac;
static Autocomplete subject_ac;
static Autocomplete form_ac;
static Autocomplete form_field_multi_ac;
@@ -752,9 +753,14 @@ cmd_ac_init(void)
autocomplete_add(role_ac, "visitor");
autocomplete_add(role_ac, "none");
- privilege_cmd_ac = autocomplete_new();
- autocomplete_add(privilege_cmd_ac, "list");
- autocomplete_add(privilege_cmd_ac, "set");
+ affiliation_cmd_ac = autocomplete_new();
+ autocomplete_add(affiliation_cmd_ac, "list");
+ autocomplete_add(affiliation_cmd_ac, "request");
+ autocomplete_add(affiliation_cmd_ac, "set");
+
+ role_cmd_ac = autocomplete_new();
+ autocomplete_add(role_cmd_ac, "list");
+ autocomplete_add(role_cmd_ac, "set");
subject_ac = autocomplete_new();
autocomplete_add(subject_ac, "set");
@@ -1300,7 +1306,8 @@ cmd_ac_reset(ProfWin* window)
autocomplete_reset(rooms_cache_ac);
autocomplete_reset(affiliation_ac);
autocomplete_reset(role_ac);
- autocomplete_reset(privilege_cmd_ac);
+ autocomplete_reset(affiliation_cmd_ac);
+ autocomplete_reset(role_cmd_ac);
autocomplete_reset(subject_ac);
autocomplete_reset(form_ac);
autocomplete_reset(form_field_multi_ac);
@@ -1457,7 +1464,8 @@ cmd_ac_uninit(void)
autocomplete_free(rooms_cache_ac);
autocomplete_free(affiliation_ac);
autocomplete_free(role_ac);
- autocomplete_free(privilege_cmd_ac);
+ autocomplete_free(affiliation_cmd_ac);
+ autocomplete_free(role_cmd_ac);
autocomplete_free(subject_ac);
autocomplete_free(form_ac);
autocomplete_free(form_field_multi_ac);
@@ -3106,7 +3114,7 @@ _affiliation_autocomplete(ProfWin* window, const char* const input, gboolean pre
return result;
}
- result = autocomplete_param_with_ac(input, "/affiliation", privilege_cmd_ac, TRUE, previous);
+ result = autocomplete_param_with_ac(input, "/affiliation", affiliation_cmd_ac, TRUE, previous);
if (result) {
return result;
}
@@ -3156,7 +3164,7 @@ _role_autocomplete(ProfWin* window, const char* const input, gboolean previous)
return result;
}
- result = autocomplete_param_with_ac(input, "/role", privilege_cmd_ac, TRUE, previous);
+ result = autocomplete_param_with_ac(input, "/role", role_cmd_ac, TRUE, previous);
if (result) {
return result;
}
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index 3493b214..2974634b 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -692,13 +692,15 @@ static struct cmd_t command_defs[] = {
CMD_TAG_GROUPCHAT)
CMD_SYN(
"/affiliation set <affiliation> <jid> [<reason>]",
- "/affiliation list [<affiliation>]")
+ "/affiliation list [<affiliation>]",
+ "/affiliation request")
CMD_DESC(
"Manage room affiliations. "
"Affiliation may be one of owner, admin, member, outcast or none.")
CMD_ARGS(
{ "set <affiliation> <jid> [<reason>]", "Set the affiliation of user with jid, with an optional reason." },
- { "list [<affiliation>]", "List all users with the specified affiliation, or all if none specified." })
+ { "list [<affiliation>]", "List all users with the specified affiliation, or all if none specified." },
+ { "request", "Request voice."})
CMD_NOEXAMPLES
},
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 6faa64b8..657850e2 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -4161,6 +4161,11 @@ cmd_affiliation(ProfWin* window, const char* const command, gchar** args)
}
}
+ if (g_strcmp0(cmd, "request") == 0) {
+ message_request_voice(mucwin->roomjid);
+ return TRUE;
+ }
+
cons_bad_cmd_usage(command);
return TRUE;
}