MUC: Add voice request
closes https://github.com/profanity-im/profanity/issues/1211
This commit is contained in:
@@ -755,6 +755,7 @@ cmd_ac_init(void)
|
||||
|
||||
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();
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user