1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-06 03:50:15 +02:00

Introduce new gen_mod callback: mod_options/1

The callback is supposed to provide known options and their default
values, as long as the documentation. Passing default values into
get_mod functions is now deprecated: all defaults should be provided
by the Mod:mod_options/1 callback.
This commit is contained in:
Evgeniy Khramtsov 2018-01-23 10:54:52 +03:00
parent c0ef054f6f
commit ba2b650464
76 changed files with 1455 additions and 1364 deletions

View file

@ -25,7 +25,7 @@
-protocol({xep, 78, '2.5'}).
%% gen_mod API
-export([start/2, stop/1, reload/3, depends/2, mod_opt_type/1]).
-export([start/2, stop/1, reload/3, depends/2, mod_options/1]).
%% hooks
-export([c2s_unauthenticated_packet/2, c2s_stream_features/2]).
@ -54,7 +54,7 @@ reload(_Host, _NewOpts, _OldOpts) ->
depends(_Host, _Opts) ->
[].
mod_opt_type(_) ->
mod_options(_) ->
[].
-spec c2s_unauthenticated_packet(c2s_state(), iq()) ->