From 2e932dd85c8ec61c7e5cdd4a8bf4f48de44dfc5f Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 15 Oct 2010 21:53:03 +0200 Subject: [PATCH] Add support to ejabberd_ctl to handle anonymous command arguments --- src/ejabberd_ctl.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index e9bca6b21..1edf5e921 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -738,6 +738,10 @@ print_usage_command(Cmd, C, MaxC, ShCode) -> ?PRINT(["\n", NameFmt, "\n", ArgsFmt, "\n", ReturnsFmt, "\n\n", XmlrpcFmt, TagsFmt, "\n\n", DescFmt, "\n\n", LongDescFmt, NoteEjabberdctl], []). +format_usage_ctype(Type, _Indentation) + when (Type==atom) or (Type==integer) or (Type==string) or (Type==rescode) or (Type==restuple)-> + io_lib:format("~p", [Type]); + format_usage_ctype({Name, Type}, _Indentation) when (Type==atom) or (Type==integer) or (Type==string) or (Type==rescode) or (Type==restuple)-> io_lib:format("~p::~p", [Name, Type]);