]> granicus.if.org Git - ejabberd/commitdiff
Fix commands api option
authorMickael Remond <mremond@process-one.net>
Tue, 29 Mar 2016 11:19:16 +0000 (13:19 +0200)
committerMickael Remond <mremond@process-one.net>
Tue, 29 Mar 2016 11:19:16 +0000 (13:19 +0200)
src/ejabberd_commands.erl

index e919d26aef716ba3d0bb1d560d9770963a67722f..21872aa339f29a5d6139969243c146ad9127cf44 100644 (file)
@@ -595,7 +595,7 @@ get_commands() ->
     UserCmds = [N || {N, _, _, user} <- CommandsList],
     Cmds =
         lists:foldl(
-          fun({add_commands, L}, Acc) ->
+          fun([{add_commands, L}], Acc) ->
                   Cmds = case L of
                              open -> OpenCmds;
                              restricted -> RestrictedCmds;
@@ -604,7 +604,7 @@ get_commands() ->
                              _ when is_list(L) -> L
                          end,
                   lists:usort(Cmds ++ Acc);
-             ({remove_commands, L}, Acc) ->
+             ([{remove_commands, L}], Acc) ->
                   Cmds = case L of
                              open -> OpenCmds;
                              restricted -> RestrictedCmds;