From 97e3a33077bb5839397feeebaed8c779c4309163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Thu, 21 Apr 2016 11:15:53 +0200 Subject: Accept commands: add_commands syntax (along commands: - add_commands) --- src/ejabberd_commands.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index dd14748d0..55ecba5d1 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -703,10 +703,11 @@ get_access_commands(AccessCommands, _Version) -> get_commands() -> get_commands(?DEFAULT_VERSION). get_commands(Version) -> - Opts = ejabberd_config:get_option( + Opts0 = ejabberd_config:get_option( commands, fun(V) when is_list(V) -> V end, []), + Opts = lists:map(fun(V) when is_tuple(V) -> [V]; (V) -> V end, Opts0), CommandsList = list_commands_policy(Version), OpenCmds = [N || {N, _, _, open} <- CommandsList], RestrictedCmds = [N || {N, _, _, restricted} <- CommandsList], -- cgit v1.2.3