diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-06-01 15:38:27 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-06-01 15:38:27 +0300 |
commit | fb6267f38ee47f3f725f88324d132741c85dfb6a (patch) | |
tree | d63c5efd207a736f9215d645ccb881bba942ed6a /src/mod_multicast.erl | |
parent | a9f7d9481f778e982c3f20ef82e41d66c6179f1c (diff) |
Add config validation at startup
Diffstat (limited to 'src/mod_multicast.erl')
-rw-r--r-- | src/mod_multicast.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mod_multicast.erl b/src/mod_multicast.erl index b6699d103..b39a391be 100644 --- a/src/mod_multicast.erl +++ b/src/mod_multicast.erl @@ -22,7 +22,7 @@ -export([init/1, handle_info/2, handle_call/3, handle_cast/2, terminate/2, code_change/3]). --export([purge_loop/1]). +-export([purge_loop/1, mod_opt_type/1]). -include("ejabberd.hrl"). -include("logger.hrl"). @@ -1162,3 +1162,10 @@ make_reply(forbidden, Lang, ErrText) -> stj(String) -> jlib:string_to_jid(String). jts(String) -> jlib:jid_to_string(String). + +mod_opt_type(access) -> + fun (A) when is_atom(A) -> A end; +mod_opt_type(host) -> fun iolist_to_binary/1; +mod_opt_type(limits) -> + fun (A) when is_list(A) -> A end; +mod_opt_type(_) -> [access, host, limits]. |