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

Print command's reply and newline only when there's something to print.

SVN Revision: 2807
This commit is contained in:
Badlop 2009-12-11 20:08:06 +00:00
parent 4ac69edfe7
commit 440299656f

View File

@ -197,8 +197,12 @@ process(["help" | Mode]) ->
process(Args) -> process(Args) ->
AccessCommands = get_accesscommands(), AccessCommands = get_accesscommands(),
{String, Code} = process2(Args, AccessCommands), {String, Code} = process2(Args, AccessCommands),
case String of
[] -> ok;
_ ->
io:format(String), io:format(String),
io:format("\n"), io:format("\n")
end,
Code. Code.
%% @spec (Args::[string()], AccessCommands) -> {String::string(), Code::integer()} %% @spec (Args::[string()], AccessCommands) -> {String::string(), Code::integer()}