case lists:keyfind(module, 1, Opts) of
{_, ejabberd_http} ->
replace_request_handlers(Opts);
+ {_, ejabberd_xmlrpc} ->
+ remove_xmlrpc_access_commands(Opts);
_ ->
Opts
end.
(_) -> true
end, Opts).
+remove_xmlrpc_access_commands(Opts) ->
+ lists:filter(
+ fun({access_commands, _}) ->
+ warn_removed_option(access_commands, api_permissions),
+ false;
+ (_) ->
+ true
+ end, Opts).
+
remove_inet_options(Opts) ->
lists:filter(
fun({Opt, _}) when Opt == inet; Opt == inet6 ->
-author('badlop@process-one.net').
-export([start/3, start_link/3, handler/2, process/2, accept/1,
- listen_opt_type/1, listen_options/0]).
+ listen_options/0]).
-include("logger.hrl").
-include("ejabberd_http.hrl").
make_status(error) -> 1;
make_status(_) -> 1.
-listen_opt_type(access_commands) ->
- fun(Opts) ->
- lists:map(
- fun({Ac, AcOpts}) ->
- Commands = case proplists:get_value(
- commands, lists:flatten(AcOpts), all) of
- Cmd when is_atom(Cmd) -> Cmd;
- Cmds when is_list(Cmds) ->
- true = lists:all(fun is_atom/1, Cmds),
- Cmds
- end,
- {<<"ejabberd_xmlrpc compatibility shim">>,
- {[?MODULE], [{access, Ac}], Commands}}
- end, lists:flatten(Opts))
- end.
-
listen_options() ->
- [{access_commands, []}].
+ [].