Merge pull request #991 from paulfariello/feature/xep-0050

Add support for xep 0050 ad-hoc commands, without multi-step
This commit is contained in:
Michael Vetter
2018-09-27 17:27:37 +02:00
committed by GitHub
38 changed files with 695 additions and 190 deletions

View File

@@ -1265,8 +1265,8 @@ static struct cmd_t command_defs[] =
CMD_TAGS(
CMD_TAG_UI)
CMD_SYN(
"/time console|chat|muc|mucconfig|private|xml set <format>",
"/time console|chat|muc|mucconfig|private|xml off",
"/time console|chat|muc|config|private|xml set <format>",
"/time console|chat|muc|config|private|xml off",
"/time statusbar set <format>",
"/time statusbar off",
"/time lastactivity set <format>")
@@ -1283,8 +1283,8 @@ static struct cmd_t command_defs[] =
{ "chat off", "Do not show time in chat windows." },
{ "muc set <format>", "Set time format for chat room windows." },
{ "muc off", "Do not show time in chat room windows." },
{ "mucconfig set <format>", "Set time format for chat room config windows." },
{ "mucconfig off", "Do not show time in chat room config windows." },
{ "config set <format>", "Set time format for config windows." },
{ "config off", "Do not show time in config windows." },
{ "private set <format>", "Set time format for private chat windows." },
{ "private off", "Do not show time in private chat windows." },
{ "xml set <format>", "Set time format for XML console window." },
@@ -2306,6 +2306,26 @@ static struct cmd_t command_defs[] =
CMD_EXAMPLES(
"/export /path/to/output.csv",
"/export ~/contacts.csv")
},
{ "/cmd",
parse_args, 1, 3, NULL,
CMD_SUBFUNCS(
{ "list", cmd_command_list },
{ "exec", cmd_command_exec })
CMD_NOMAINFUNC
CMD_NOTAGS
CMD_SYN(
"/cmd list [<jid>]",
"/cmd exec <command> [<jid>]")
CMD_DESC(
"Execute ad hoc commands.")
CMD_ARGS(
{ "list", "List supported ad hoc commands." },
{ "exec <command>", "Execute a command." })
CMD_EXAMPLES(
"/cmd list",
"/cmd exec ping")
}
};