1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-05 10:39:29 +02:00

Reload modules when reloading configuration file

This commit is contained in:
Evgeniy Khramtsov 2017-02-22 19:46:47 +03:00
parent ff67860cdb
commit 3c4057ff55
48 changed files with 1084 additions and 298 deletions

View file

@ -74,7 +74,7 @@
-behaviour(gen_mod).
-export([start/2, stop/1, process/2, mod_opt_type/1, depends/2]).
-export([start/2, stop/1, reload/3, process/2, mod_opt_type/1, depends/2]).
-include("ejabberd.hrl").
-include("xmpp.hrl").
@ -125,6 +125,10 @@ stop(_Host) ->
ejabberd_access_permissions:unregister_permission_addon(?MODULE),
ok.
reload(Host, NewOpts, _OldOpts) ->
stop(Host),
start(Host, NewOpts).
depends(_Host, _Opts) ->
[].