25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Fix commands api option

This commit is contained in:
Mickael Remond 2016-03-29 13:19:16 +02:00
parent 3b2d0fd24a
commit b49a615e21

View File

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