]> granicus.if.org Git - ejabberd/commitdiff
Fix to show correctly the command that is unknown
authorBadlop <badlop@process-one.net>
Wed, 23 Feb 2011 15:51:40 +0000 (16:51 +0100)
committerBadlop <badlop@process-one.net>
Wed, 23 Feb 2011 15:51:40 +0000 (16:51 +0100)
src/ejabberd_ctl.erl

index e1fd09d6728a213ba5bc98402257f608516b6e8b..e610503631229c1758733d000e9e982da76607b3 100644 (file)
@@ -283,7 +283,7 @@ call_command([CmdString | Args], Auth, AccessCommands) ->
     Command = list_to_atom(CmdStringU),
     case ejabberd_commands:get_command_format(Command) of
        {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} ->
            case (catch format_args(Args, ArgsFormat)) of
                ArgsFormatted when is_list(ArgsFormatted) ->