25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Fix to show correctly the command that is unknown

This commit is contained in:
Badlop 2011-02-23 16:51:40 +01:00
parent eaa17dab90
commit 9a55ced505

View File

@ -283,7 +283,7 @@ call_command([CmdString | Args], Auth, AccessCommands) ->
Command = list_to_atom(CmdStringU), Command = list_to_atom(CmdStringU),
case ejabberd_commands:get_command_format(Command) of case ejabberd_commands:get_command_format(Command) of
{error, command_unknown} -> {error, command_unknown} ->
{error, io_lib:format("Error: command ~p not known.", [hd(Args)])}; {error, io_lib:format("Error: command ~p not known.", [CmdString])};
{ArgsFormat, ResultFormat} -> {ArgsFormat, ResultFormat} ->
case (catch format_args(Args, ArgsFormat)) of case (catch format_args(Args, ArgsFormat)) of
ArgsFormatted when is_list(ArgsFormatted) -> ArgsFormatted when is_list(ArgsFormatted) ->