From 97da380acd8e3ba0c9a9618a99c4106eca1d1576 Mon Sep 17 00:00:00 2001 From: Evgeny Khramtsov Date: Wed, 8 Jan 2020 12:24:51 +0300 Subject: Generate ejabberd.yml.5 man page from source code directly Several documentation callbacks (doc/0 and mod_doc/0) are implemented and `ejabberdctl man` command is added to generate a man page. Note that the command requires a2x to be installed (which is a part of asciidoc package). --- src/mod_legacy_auth.erl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mod_legacy_auth.erl') diff --git a/src/mod_legacy_auth.erl b/src/mod_legacy_auth.erl index a48ef8de5..1b25be54b 100644 --- a/src/mod_legacy_auth.erl +++ b/src/mod_legacy_auth.erl @@ -25,7 +25,7 @@ -protocol({xep, 78, '2.5'}). %% gen_mod API --export([start/2, stop/1, reload/3, depends/2, mod_options/1]). +-export([start/2, stop/1, reload/3, depends/2, mod_options/1, mod_doc/0]). %% hooks -export([c2s_unauthenticated_packet/2, c2s_stream_features/2]). @@ -58,6 +58,15 @@ depends(_Host, _Opts) -> mod_options(_) -> []. +mod_doc() -> + #{desc => + [?T("The module implements " + "https://xmpp.org/extensions/xep-0078.html" + "[XEP-0078: Non-SASL Authentication]."), "", + ?T("NOTE: This type of authentication was obsoleted in " + "2008 and you unlikely need this module unless " + "you have something like outdated Jabber bots.")]}. + -spec c2s_unauthenticated_packet(c2s_state(), iq()) -> c2s_state() | {stop, c2s_state()}. c2s_unauthenticated_packet(State, #iq{type = T, sub_els = [_]} = IQ) -- cgit v1.2.3