From 443f39bfdb4fedfeee81b48924eef1c62254b25d Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 8 Jul 2025 12:34:34 +0200 Subject: [PATCH] Result of running "make format doap options" --- ejabberd.doap | 15 ++++++-- src/mod_antispam_opt.erl | 62 +++++++++++++++++++++++++++++++ src/mod_pubsub_serverinfo.erl | 9 ++--- src/mod_pubsub_serverinfo_opt.erl | 13 +++++++ 4 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 src/mod_antispam_opt.erl create mode 100644 src/mod_pubsub_serverinfo_opt.erl diff --git a/ejabberd.doap b/ejabberd.doap index 1fc7df52e..0e72bf3ad 100644 --- a/ejabberd.doap +++ b/ejabberd.doap @@ -773,6 +773,15 @@ mod_mam + + + + 0.2.0 + 24.12 + complete + mod_mam + + @@ -821,10 +830,10 @@ - 0.2.0 - 24.02 + 0.1.1 + 25.07 complete - , mod_pubsub_serverinfo in ejabberd-contrib.git + mod_pubsub_serverinfo diff --git a/src/mod_antispam_opt.erl b/src/mod_antispam_opt.erl new file mode 100644 index 000000000..008a2aac1 --- /dev/null +++ b/src/mod_antispam_opt.erl @@ -0,0 +1,62 @@ +%% Generated automatically +%% DO NOT EDIT: run `make options` instead + +-module(mod_antispam_opt). + +-export([access_spam/1]). +-export([cache_size/1]). +-export([rtbl_services/1]). +-export([spam_domains_file/1]). +-export([spam_dump_file/1]). +-export([spam_jids_file/1]). +-export([spam_urls_file/1]). +-export([whitelist_domains_file/1]). + +-spec access_spam(gen_mod:opts() | global | binary()) -> 'none' | acl:acl(). +access_spam(Opts) when is_map(Opts) -> + gen_mod:get_opt(access_spam, Opts); +access_spam(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, access_spam). + +-spec cache_size(gen_mod:opts() | global | binary()) -> 'unlimited' | pos_integer(). +cache_size(Opts) when is_map(Opts) -> + gen_mod:get_opt(cache_size, Opts); +cache_size(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, cache_size). + +-spec rtbl_services(gen_mod:opts() | global | binary()) -> [binary() | [{binary(),[{'spam_source_domains_node',binary()}]}]]. +rtbl_services(Opts) when is_map(Opts) -> + gen_mod:get_opt(rtbl_services, Opts); +rtbl_services(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, rtbl_services). + +-spec spam_domains_file(gen_mod:opts() | global | binary()) -> 'none' | binary(). +spam_domains_file(Opts) when is_map(Opts) -> + gen_mod:get_opt(spam_domains_file, Opts); +spam_domains_file(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, spam_domains_file). + +-spec spam_dump_file(gen_mod:opts() | global | binary()) -> boolean() | binary(). +spam_dump_file(Opts) when is_map(Opts) -> + gen_mod:get_opt(spam_dump_file, Opts); +spam_dump_file(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, spam_dump_file). + +-spec spam_jids_file(gen_mod:opts() | global | binary()) -> 'none' | binary(). +spam_jids_file(Opts) when is_map(Opts) -> + gen_mod:get_opt(spam_jids_file, Opts); +spam_jids_file(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, spam_jids_file). + +-spec spam_urls_file(gen_mod:opts() | global | binary()) -> 'none' | binary(). +spam_urls_file(Opts) when is_map(Opts) -> + gen_mod:get_opt(spam_urls_file, Opts); +spam_urls_file(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, spam_urls_file). + +-spec whitelist_domains_file(gen_mod:opts() | global | binary()) -> 'none' | binary(). +whitelist_domains_file(Opts) when is_map(Opts) -> + gen_mod:get_opt(whitelist_domains_file, Opts); +whitelist_domains_file(Host) -> + gen_mod:get_module_opt(Host, mod_antispam, whitelist_domains_file). + diff --git a/src/mod_pubsub_serverinfo.erl b/src/mod_pubsub_serverinfo.erl index 80da0d26a..45a24a31e 100644 --- a/src/mod_pubsub_serverinfo.erl +++ b/src/mod_pubsub_serverinfo.erl @@ -225,10 +225,7 @@ mod_doc() -> "This option is only needed if your configuration has more than one host in mod_pubsub's 'hosts' option. " "The default value is the first host defined in mod_pubsub 'hosts' option.")}}], example => - ["modules:", - " mod_pubsub_serverinfo:", - " pubsub_host: custom.pubsub.domain.local"] - }. + ["modules:", " mod_pubsub_serverinfo:", " pubsub_host: custom.pubsub.domain.local"]}. in_auth_result(#{server_host := Host, remote_server := RServer} = State, true, _Server) -> gen_server:cast( @@ -362,7 +359,9 @@ get_info(Acc, _Host, _Mod, _Node, _Lang) -> Acc. pubsub_host(Host) -> - {ok, PubsubHost} = gen_server:call(gen_mod:get_module_proc(Host, ?MODULE), pubsub_host), + {ok, PubsubHost} = + gen_server:call( + gen_mod:get_module_proc(Host, ?MODULE), pubsub_host), PubsubHost. pubsub_host(Host, Opts) -> diff --git a/src/mod_pubsub_serverinfo_opt.erl b/src/mod_pubsub_serverinfo_opt.erl new file mode 100644 index 000000000..731715f3c --- /dev/null +++ b/src/mod_pubsub_serverinfo_opt.erl @@ -0,0 +1,13 @@ +%% Generated automatically +%% DO NOT EDIT: run `make options` instead + +-module(mod_pubsub_serverinfo_opt). + +-export([pubsub_host/1]). + +-spec pubsub_host(gen_mod:opts() | global | binary()) -> 'undefined' | binary(). +pubsub_host(Opts) when is_map(Opts) -> + gen_mod:get_opt(pubsub_host, Opts); +pubsub_host(Host) -> + gen_mod:get_module_opt(Host, mod_pubsub_serverinfo, pubsub_host). +