25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Remove old obsolete R14 code

This commit is contained in:
Badlop 2013-06-14 16:18:22 +02:00
parent 4c445b37fd
commit 243d24015c

View File

@ -294,18 +294,7 @@ call_command([CmdString | Args], Auth, AccessCommands) ->
Result = ejabberd_commands:execute_command(AccessCommands, Auth, Command,
ArgsFormatted),
format_result(Result, ResultFormat);
%% This case clause is for Erlang R14 and older
{'EXIT', {function_clause,[{lists,zip,[A1, A2]} | _]}} ->
{NumCompa, TextCompa} =
case {length(A1), length(A2)} of
{L1, L2} when L1 < L2 -> {L2-L1, "less argument"};
{L1, L2} when L1 > L2 -> {L1-L2, "more argument"}
end,
{io_lib:format("Error: the command ~p requires ~p ~s.",
[CmdString, NumCompa, TextCompa]),
wrong_command_arguments};
%% This case clause is for Erlang R15 and newer
{'EXIT', {function_clause,[{lists,zip,[A1, A2],_} | _]}} ->
{'EXIT', {function_clause,[{lists,zip,[A1, A2], _} | _]}} ->
{NumCompa, TextCompa} =
case {length(A1), length(A2)} of
{L1, L2} when L1 < L2 -> {L2-L1, "less argument"};