25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

ejabberd_ctl: Show proper command help when version is explicitly set

This commit is contained in:
Badlop 2023-11-30 11:58:07 +01:00
parent c4c0cd1b77
commit b34572e7ce

View File

@ -340,7 +340,7 @@ call_command([CmdString | Args], Auth, _AccessCommands, Version) ->
{L1, L2} when L1 < L2 -> {L2-L1, "less argument"}; {L1, L2} when L1 < L2 -> {L2-L1, "less argument"};
{L1, L2} when L1 > L2 -> {L1-L2, "more argument"} {L1, L2} when L1 > L2 -> {L1-L2, "more argument"}
end, end,
process(["help" | [CmdString]]), process(["help" | [CmdString]], Version),
{io_lib:format("Error: the command '~ts' requires ~p ~ts.", {io_lib:format("Error: the command '~ts' requires ~p ~ts.",
[CmdString, NumCompa, TextCompa]), [CmdString, NumCompa, TextCompa]),
wrong_command_arguments} wrong_command_arguments}