aboutsummaryrefslogtreecommitdiff
path: root/src/ext_mod.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext_mod.erl')
-rw-r--r--src/ext_mod.erl21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/ext_mod.erl b/src/ext_mod.erl
index 473aeb4eb..bfc448dcf 100644
--- a/src/ext_mod.erl
+++ b/src/ext_mod.erl
@@ -24,16 +24,16 @@
%%%----------------------------------------------------------------------
-module(ext_mod).
+
+-behaviour(ejabberd_config).
-author("Christophe Romain <christophe.romain@process-one.net>").
-%% Packaging service
-export([start/0, stop/0, update/0, check/1,
- available_command/0, available/0, available/1,
- installed_command/0, installed/0, installed/1,
- install/1, uninstall/1,
- upgrade/0, upgrade/1,
- add_sources/2, del_sources/1,
- modules_dir/0]).
+ available_command/0, available/0, available/1,
+ installed_command/0, installed/0, installed/1,
+ install/1, uninstall/1, upgrade/0, upgrade/1,
+ add_sources/2, del_sources/1, modules_dir/0,
+ opt_type/1]).
-include("ejabberd_commands.hrl").
@@ -517,3 +517,10 @@ format({Key, Val}) when is_binary(Val) ->
{Key, binary_to_list(Val)};
format({Key, Val}) -> % TODO: improve Yaml parsing
{Key, Val}.
+
+opt_type(allow_contrib_modules) ->
+ fun (false) -> false;
+ (no) -> false;
+ (_) -> true
+ end;
+opt_type(_) -> [allow_contrib_modules].