From a95e657a210a3de39040b7e3f43b02375bcf3869 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 6 Jul 2021 20:57:36 +0200 Subject: [PATCH] Add simple mod_doc/0 to prevent warnings; they won't be used anyway --- mod_cron/src/mod_cron.erl | 5 ++++- mod_default_contacts/src/mod_default_contacts.erl | 6 +++++- mod_default_rooms/src/mod_default_rooms.erl | 6 +++++- mod_deny_omemo/src/mod_deny_omemo.erl | 6 +++++- mod_filter/src/mod_filter.erl | 4 +++- mod_grafite/src/mod_grafite.erl | 4 +++- mod_irc/src/mod_irc.erl | 4 +++- mod_isolation/src/mod_isolation.erl | 4 +++- mod_log_chat/src/mod_log_chat.erl | 4 +++- mod_logsession/src/mod_logsession.erl | 4 +++- mod_logxml/src/mod_logxml.erl | 4 +++- mod_message_log/src/mod_message_log.erl | 5 ++++- mod_muc_log_http/src/mod_muc_log_http.erl | 4 +++- mod_post_log/src/mod_post_log.erl | 3 +++ mod_pottymouth/src/mod_pottymouth.erl | 2 ++ mod_rest/src/mod_rest.erl | 4 +++- mod_s2s_log/src/mod_s2s_log.erl | 3 +++ mod_shcommands/src/mod_shcommands.erl | 4 +++- mod_spam_filter/src/mod_spam_filter.erl | 3 +++ mod_statsdx/src/mod_statsdx.erl | 4 +++- mod_webpresence/src/mod_webpresence.erl | 4 +++- 21 files changed, 70 insertions(+), 17 deletions(-) diff --git a/mod_cron/src/mod_cron.erl b/mod_cron/src/mod_cron.erl index 656c83f..5e59ef5 100644 --- a/mod_cron/src/mod_cron.erl +++ b/mod_cron/src/mod_cron.erl @@ -11,7 +11,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_options/1, mod_opt_type/1]). +-export([start/2, stop/1, depends/2, mod_options/1, mod_opt_type/1, mod_doc/0]). -export([cron_list/1, cron_del/1, run_task/3, web_menu_host/3, web_page_host/3, @@ -57,6 +57,9 @@ mod_opt_type(tasks) -> mod_options(_Host) -> [{tasks, []}]. +mod_doc() -> + #{}. + %% --------------------- %% Task management %% --------------------- diff --git a/mod_default_contacts/src/mod_default_contacts.erl b/mod_default_contacts/src/mod_default_contacts.erl index 1238b73..c78ead2 100644 --- a/mod_default_contacts/src/mod_default_contacts.erl +++ b/mod_default_contacts/src/mod_default_contacts.erl @@ -28,7 +28,8 @@ -behavior(gen_mod). %% gen_mod callbacks. --export([start/2, stop/1, reload/3, mod_opt_type/1, depends/2, mod_options/1]). +-export([start/2, stop/1, reload/3, mod_opt_type/1, depends/2, mod_options/1, + mod_doc/0]). %% ejabberd_hooks callbacks. -export([register_user/2]). @@ -72,6 +73,9 @@ mod_options(_Host) -> depends(_Host, _Opts) -> [{mod_roster, hard}]. +mod_doc() -> + #{}. + %%-------------------------------------------------------------------- %% ejabberd_hooks callbacks. %%-------------------------------------------------------------------- diff --git a/mod_default_rooms/src/mod_default_rooms.erl b/mod_default_rooms/src/mod_default_rooms.erl index d593476..5b4fde2 100644 --- a/mod_default_rooms/src/mod_default_rooms.erl +++ b/mod_default_rooms/src/mod_default_rooms.erl @@ -28,7 +28,8 @@ -behavior(gen_mod). %% gen_mod callbacks. --export([start/2, stop/1, reload/3, mod_opt_type/1, depends/2, mod_options/1]). +-export([start/2, stop/1, reload/3, mod_opt_type/1, depends/2, mod_options/1, + mod_doc/0]). %% ejabberd_hooks callbacks. -export([register_user/2]). @@ -66,6 +67,9 @@ mod_options(_Host) -> depends(_Host, _Opts) -> [{mod_private, hard}]. +mod_doc() -> + #{}. + %%-------------------------------------------------------------------- %% ejabberd_hooks callbacks. %%-------------------------------------------------------------------- diff --git a/mod_deny_omemo/src/mod_deny_omemo.erl b/mod_deny_omemo/src/mod_deny_omemo.erl index 6df32f9..4ae741e 100644 --- a/mod_deny_omemo/src/mod_deny_omemo.erl +++ b/mod_deny_omemo/src/mod_deny_omemo.erl @@ -28,7 +28,8 @@ -behavior(gen_mod). %% gen_mod callbacks. --export([start/2, stop/1, reload/3, mod_opt_type/1, depends/2, mod_options/1]). +-export([start/2, stop/1, reload/3, mod_opt_type/1, depends/2, mod_options/1, + mod_doc/0]). %% ejabberd_hooks callbacks. -export([user_receive_packet/1, user_send_packet/1]). @@ -76,6 +77,9 @@ mod_options(_Host) -> depends(_Host, _Opts) -> [{mod_pubsub, hard}]. +mod_doc() -> + #{}. + %%-------------------------------------------------------------------- %% ejabberd_hooks callbacks. %%-------------------------------------------------------------------- diff --git a/mod_filter/src/mod_filter.erl b/mod_filter/src/mod_filter.erl index fd0f85d..f6c72e0 100644 --- a/mod_filter/src/mod_filter.erl +++ b/mod_filter/src/mod_filter.erl @@ -10,7 +10,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_options/1, filter_packet/1]). +-export([start/2, stop/1, depends/2, mod_options/1, filter_packet/1, mod_doc/0]). -include("logger.hrl"). -include_lib("xmpp/include/xmpp.hrl"). @@ -103,3 +103,5 @@ depends(_Host, _Opts) -> []. mod_options(_) -> []. + +mod_doc() -> #{}. diff --git a/mod_grafite/src/mod_grafite.erl b/mod_grafite/src/mod_grafite.erl index f7e3a3e..21c15cd 100644 --- a/mod_grafite/src/mod_grafite.erl +++ b/mod_grafite/src/mod_grafite.erl @@ -24,7 +24,7 @@ -define(GLOBAL_HOOKS, [component_connected, component_disconnected]). -export([start/2, stop/1, mod_opt_type/1, - depends/2, udp_loop_start/1, push/2]). + depends/2, mod_doc/0, udp_loop_start/1, push/2]). -export([offline_message_hook/3, sm_register_connection_hook/3, sm_remove_connection_hook/3, @@ -66,6 +66,8 @@ stop(Host) -> depends(_Host, _Opts) -> []. +mod_doc() -> #{}. + %%==================================================================== %% Hooks handlers %%==================================================================== diff --git a/mod_irc/src/mod_irc.erl b/mod_irc/src/mod_irc.erl index 35d9f99..5cd5af8 100644 --- a/mod_irc/src/mod_irc.erl +++ b/mod_irc/src/mod_irc.erl @@ -39,7 +39,7 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3, - mod_opt_type/1, mod_options/1, depends/2]). + mod_opt_type/1, mod_options/1, depends/2, mod_doc/0]). -include("logger.hrl"). -include_lib("xmpp/include/xmpp.hrl"). @@ -79,6 +79,8 @@ reload(Host, NewOpts, OldOpts) -> depends(_Host, _Opts) -> []. +mod_doc() -> #{}. + %%==================================================================== %% gen_server callbacks %%==================================================================== diff --git a/mod_isolation/src/mod_isolation.erl b/mod_isolation/src/mod_isolation.erl index b247fd2..d5d54f9 100644 --- a/mod_isolation/src/mod_isolation.erl +++ b/mod_isolation/src/mod_isolation.erl @@ -19,7 +19,7 @@ -behaviour(gen_mod). %% gen_mod callbacks --export([start/2, stop/1, reload/3, mod_options/1, depends/2]). +-export([start/2, stop/1, reload/3, mod_options/1, depends/2, mod_doc/0]). %% hooks -export([filter_packet/1]). @@ -48,6 +48,8 @@ mod_options(_) -> depends(_Host, _Opts) -> []. +mod_doc() -> #{}. + %%%=================================================================== %%% Internal functions %%%=================================================================== diff --git a/mod_log_chat/src/mod_log_chat.erl b/mod_log_chat/src/mod_log_chat.erl index 26c2ea0..46e8f61 100644 --- a/mod_log_chat/src/mod_log_chat.erl +++ b/mod_log_chat/src/mod_log_chat.erl @@ -10,7 +10,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_opt_type/1, mod_options/1]). +-export([start/2, stop/1, depends/2, mod_opt_type/1, mod_options/1, mod_doc/0]). -export([init/1, log_packet_send/1, log_packet_receive/1]). @@ -288,3 +288,5 @@ mod_options(_Host) -> [{host_config, []}, {path, ?DEFAULT_PATH}, {format, ?DEFAULT_FORMAT}]. + +mod_doc() -> #{}. diff --git a/mod_logsession/src/mod_logsession.erl b/mod_logsession/src/mod_logsession.erl index 84cfa1d..1214300 100644 --- a/mod_logsession/src/mod_logsession.erl +++ b/mod_logsession/src/mod_logsession.erl @@ -29,7 +29,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_options/1, mod_opt_type/1]). +-export([start/2, stop/1, depends/2, mod_options/1, mod_opt_type/1, mod_doc/0]). -export([loop/3, reopen_log/1, failed_auth/3, @@ -74,6 +74,8 @@ mod_opt_type(sessionlog) -> mod_options(_Host) -> [{sessionlog, "/tmp/ejabberd_logsession_@HOST@.log"}]. +mod_doc() -> #{}. + %%%---------------------------------------------------------------------- %%% REQUEST HANDLERS %%%---------------------------------------------------------------------- diff --git a/mod_logxml/src/mod_logxml.erl b/mod_logxml/src/mod_logxml.erl index b006ccb..3588401 100644 --- a/mod_logxml/src/mod_logxml.erl +++ b/mod_logxml/src/mod_logxml.erl @@ -13,7 +13,7 @@ -export([start/2, init/6, stop/1, send_packet/1, receive_packet/1, - mod_opt_type/1, mod_options/1, depends/2]). + mod_opt_type/1, mod_options/1, depends/2, mod_doc/0]). -include_lib("xmpp/include/xmpp.hrl"). @@ -71,6 +71,8 @@ init(Host, Logdir, RotateO, CheckRKP, ShowIP, FilterO) -> depends(_Host, _Opts) -> []. +mod_doc() -> #{}. + %% ------------------- %% Main %% ------------------- diff --git a/mod_message_log/src/mod_message_log.erl b/mod_message_log/src/mod_message_log.erl index 972ed94..a76aa62 100644 --- a/mod_message_log/src/mod_message_log.erl +++ b/mod_message_log/src/mod_message_log.erl @@ -34,7 +34,8 @@ stop/1, mod_opt_type/1, mod_options/1, - depends/2]). + depends/2, + mod_doc/0]). %% gen_server callbacks. -export([init/1, @@ -106,6 +107,8 @@ mod_options(_Host) -> depends(_Host, _Opts) -> []. +mod_doc() -> #{}. + %% ------------------------------------------------------------------- %% gen_server callbacks. %% ------------------------------------------------------------------- diff --git a/mod_muc_log_http/src/mod_muc_log_http.erl b/mod_muc_log_http/src/mod_muc_log_http.erl index 6d1b079..bd6036b 100644 --- a/mod_muc_log_http/src/mod_muc_log_http.erl +++ b/mod_muc_log_http/src/mod_muc_log_http.erl @@ -10,7 +10,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_options/1]). +-export([start/2, stop/1, depends/2, mod_options/1, mod_doc/0]). -export([process/2]). @@ -235,3 +235,5 @@ depends(_Host, _Opts) -> mod_options(_Host) -> []. + +mod_doc() -> #{}. diff --git a/mod_post_log/src/mod_post_log.erl b/mod_post_log/src/mod_post_log.erl index 18c7f43..d723aab 100644 --- a/mod_post_log/src/mod_post_log.erl +++ b/mod_post_log/src/mod_post_log.erl @@ -17,6 +17,7 @@ depends/2, mod_opt_type/1, mod_options/1, + mod_doc/0, log_user_send/1, log_user_send/4, post_result/1]). @@ -61,6 +62,8 @@ mod_options(_Host) -> {http_options, []}, {req_options, []}]. +mod_doc() -> #{}. + %% TODO: remove log_user_send/4 after 17.02 is released log_user_send(Packet, C2SState, From, To) -> log_user_send({xmpp:set_from_to(Packet, From, To), C2SState}), diff --git a/mod_pottymouth/src/mod_pottymouth.erl b/mod_pottymouth/src/mod_pottymouth.erl index 7ccaa5e..4a5c343 100644 --- a/mod_pottymouth/src/mod_pottymouth.erl +++ b/mod_pottymouth/src/mod_pottymouth.erl @@ -10,6 +10,7 @@ stop/1, on_filter_packet/1, mod_opt_type/1, + mod_doc/0, depends/2, reload/3, mod_options/1 @@ -105,3 +106,4 @@ depends(_Host, _Opts) -> []. reload(_Host, _NewOpts, _OldOpts) -> ok. mod_options(_) -> [{blacklists, []},{charmaps, []}]. +mod_doc() -> #{}. diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index 5780ff3..a6d63b0 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -31,7 +31,7 @@ depends/2, split_line/1, process/2, - mod_opt_type/1, mod_options/1]). + mod_opt_type/1, mod_options/1, mod_doc/0]). -include("logger.hrl"). -include("ejabberd_http.hrl"). @@ -187,3 +187,5 @@ mod_options(_Host) -> {allowed_destinations, []}, {allowed_stanza_types, []}, {access_commands, []}]. + +mod_doc() -> #{}. diff --git a/mod_s2s_log/src/mod_s2s_log.erl b/mod_s2s_log/src/mod_s2s_log.erl index 270d4d9..906a227 100644 --- a/mod_s2s_log/src/mod_s2s_log.erl +++ b/mod_s2s_log/src/mod_s2s_log.erl @@ -32,6 +32,7 @@ init/1, stop/1, depends/2, + mod_doc/0, mod_opt_type/1, mod_options/1]). %% Hooks: @@ -119,6 +120,8 @@ mod_opt_type(filename) -> mod_options(_Host) -> [{filename, ?DEFAULT_FILENAME}]. +mod_doc() -> #{}. + %% --- %% Internal functions diff --git a/mod_shcommands/src/mod_shcommands.erl b/mod_shcommands/src/mod_shcommands.erl index 4be2ab1..835e1b1 100644 --- a/mod_shcommands/src/mod_shcommands.erl +++ b/mod_shcommands/src/mod_shcommands.erl @@ -11,7 +11,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_options/1]). +-export([start/2, stop/1, depends/2, mod_options/1, mod_doc/0]). -export([execute_system/1, execute_erlang/1]). -export([web_menu_node/3, web_page_node/5]). @@ -47,6 +47,8 @@ depends(_Host, _Opts) -> mod_options(_Host) -> []. +mod_doc() -> #{}. + %%------------------- %% Commands %%------------------- diff --git a/mod_spam_filter/src/mod_spam_filter.erl b/mod_spam_filter/src/mod_spam_filter.erl index 6af636d..f40cf16 100644 --- a/mod_spam_filter/src/mod_spam_filter.erl +++ b/mod_spam_filter/src/mod_spam_filter.erl @@ -34,6 +34,7 @@ stop/1, reload/3, depends/2, + mod_doc/0, mod_opt_type/1, mod_options/1]). @@ -130,6 +131,8 @@ mod_options(_Host) -> {access_spam, none}, {cache_size, 10000}]. +mod_doc() -> #{}. + %%-------------------------------------------------------------------- %% gen_server callbacks. %%-------------------------------------------------------------------- diff --git a/mod_statsdx/src/mod_statsdx.erl b/mod_statsdx/src/mod_statsdx.erl index 1d7de63..5b80084 100644 --- a/mod_statsdx/src/mod_statsdx.erl +++ b/mod_statsdx/src/mod_statsdx.erl @@ -13,7 +13,7 @@ -behaviour(gen_mod). --export([start/2, stop/1, depends/2, mod_opt_type/1, mod_options/1]). +-export([start/2, stop/1, depends/2, mod_opt_type/1, mod_options/1, mod_doc/0]). -export([loop/1, get_statistic/2, pre_uninstall/0, received_response/3, @@ -98,6 +98,8 @@ mod_options(_Host) -> [{hooks, false}, {sessionlog, "/tmp/ejabberd_logsession_@HOST@.log"}]. +mod_doc() -> #{}. + %%%================================== %%%% Stats Server diff --git a/mod_webpresence/src/mod_webpresence.erl b/mod_webpresence/src/mod_webpresence.erl index 1b74a48..7b94d1e 100644 --- a/mod_webpresence/src/mod_webpresence.erl +++ b/mod_webpresence/src/mod_webpresence.erl @@ -26,7 +26,7 @@ %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3, - mod_opt_type/1, mod_options/1, depends/2]). + mod_opt_type/1, mod_options/1, depends/2, mod_doc/0]). %% API -export([start_link/0]). @@ -98,6 +98,8 @@ mod_options(Host) -> depends(_Host, _Opts) -> []. +mod_doc() -> #{}. + %%==================================================================== %% gen_server callbacks %%====================================================================