]> granicus.if.org Git - ejabberd/commitdiff
Print command's reply and newline only when there's something to print.
authorBadlop <badlop@process-one.net>
Fri, 11 Dec 2009 20:04:36 +0000 (20:04 +0000)
committerBadlop <badlop@process-one.net>
Fri, 11 Dec 2009 20:04:36 +0000 (20:04 +0000)
SVN Revision: 2806

src/ejabberd_ctl.erl

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