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:
parent
c0ef054f6f
commit
ba2b650464
76 changed files with 1455 additions and 1364 deletions
|
@ -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()) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue