mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Get the arguments definition from the record (#3569)
This fixes "ejabberdctl help help"
This commit is contained in:
parent
327dc31e62
commit
f8a02f5d9d
@ -748,14 +748,13 @@ print_usage_command2(Cmd, C, MaxC, ShCode) ->
|
||||
#ejabberd_commands{
|
||||
tags = TagsAtoms,
|
||||
desc = Desc,
|
||||
args = ArgsDef,
|
||||
longdesc = LongDesc,
|
||||
result = ResultDef} = C,
|
||||
|
||||
NameFmt = [" ", ?B("Command Name"), ": ", Cmd, "\n"],
|
||||
|
||||
%% Initial indentation of result is 13 = length(" Arguments: ")
|
||||
{ArgsDef, _, _} = ejabberd_commands:get_command_format(
|
||||
C#ejabberd_commands.name, admin),
|
||||
Args = [format_usage_ctype(ArgDef, 13) || ArgDef <- ArgsDef],
|
||||
ArgsMargin = lists:duplicate(13, $\s),
|
||||
ArgsListFmt = case Args of
|
||||
|
Loading…
Reference in New Issue
Block a user