Added /ping command

This commit is contained in:
James Booth
2014-09-04 01:08:10 +01:00
parent b50b786dcc
commit 4ba33cb13c
9 changed files with 86 additions and 4 deletions

View File

@@ -722,6 +722,14 @@ static struct cmd_t command_defs[] =
"A value of 0 will switch off autopinging the server.",
NULL } } },
{ "/ping",
cmd_ping, parse_args, 0, 1, NULL,
{ "/ping [target]", "Send ping IQ request.",
{ "/ping [rarget]",
"--------------",
"Sends an IQ ping stanza to the specificed target.",
NULL } } },
{ "/autoaway",
cmd_autoaway, parse_args_with_freetext, 2, 2, &cons_autoaway_setting,
{ "/autoaway setting value", "Set auto idle/away properties.",
@@ -1592,7 +1600,7 @@ _cmd_complete_parameters(char *input, int *size)
}
}
gchar *resource_choices[] = { "/caps", "/software" };
gchar *resource_choices[] = { "/caps", "/software", "/ping" };
for (i = 0; i < ARRAY_SIZE(resource_choices); i++) {
result = autocomplete_param_with_func(input, size, resource_choices[i],
roster_find_resource);