annotate mod_admin_blocklist/README.md @ 6084:4c0e3fe57e92

mod_compliance_latest: Gracefull error logging on missing dependency. diff --git a/mod_compliance_latest/README.md b/mod_compliance_latest/README.md --- a/mod_compliance_latest/README.md +++ b/mod_compliance_latest/README.md @@ -9,13 +9,15 @@ rockspec: # Introduction -This module will always require and load to the lastest compliance tester we have in the community modules. -Currently this is [mod_compliance_2023]. +This meta-module will always `require` (and therefore auto-load) the lastest compliance tester we have in the community modules. +Currently this is [mod_compliance_2023]. See the linked module for further details. + +If you do not use the *Prosody plugin installer* this module will likely have limited value to you. +You can also just install the current compliance tester manually. # Configuration -Just load this module as any other module and it will automatically install [mod_compliance_2023] if you use the Prosody plugin installer. -See the linked module for further details. +Just load this module as any other module and it will automatically install and load [mod_compliance_2023] if you use the *Prosody plugin installer*. # Compatibility diff --git a/mod_compliance_latest/mod_compliance_latest.lua b/mod_compliance_latest/mod_compliance_latest.lua --- a/mod_compliance_latest/mod_compliance_latest.lua +++ b/mod_compliance_latest/mod_compliance_latest.lua @@ -1,1 +1,6 @@ -module:depends("compliance_2023"); +local success, err = pcall(function() module:depends("compliance_2023") end) + +if not success then + module:log("error", "Error, can't load module: mod_compliance_2023. Is this module downloaded in a folder readable by prosody?") + return 1, "Error: Couldn't load dependency mod_compliance_2023." +end
author Menel <menel@snikket.de>
date Mon, 23 Dec 2024 12:58:03 +0100
parents 0e0c6618e154
children 1661f6a74141
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1855
7eef1a3a2a17 mod_admin_blocklist: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 ---
6075
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
2 summary: Block s2s connections based on admin blocklist
5976
bd0b4d8aa94e mod_admin_blocklist: Update README Compability Section
Menel <menel@snikket.de>
parents: 5975
diff changeset
3 labels:
bd0b4d8aa94e mod_admin_blocklist: Update README Compability Section
Menel <menel@snikket.de>
parents: 5975
diff changeset
4 - 'Stage-Beta'
1855
7eef1a3a2a17 mod_admin_blocklist: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 ...
7eef1a3a2a17 mod_admin_blocklist: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6
7eef1a3a2a17 mod_admin_blocklist: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 This module uses the blocklists set by admins for blocking s2s
7eef1a3a2a17 mod_admin_blocklist: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 connections.
7eef1a3a2a17 mod_admin_blocklist: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9
2315
212564152060 mod_admin_blocklist/README: Autolinks!
Kim Alvefur <zash@zash.se>
parents: 2314
diff changeset
10 So if an admin blocks a bare domain using [Blocking Command][xep191]
2316
2a2de19413e7 mod_admin_blocklist/README: Turns out autolink.lua doesn't know about official modules
Kim Alvefur <zash@zash.se>
parents: 2315
diff changeset
11 via [mod\_blocklist][doc:modules:mod_blocklist] then no s2s connections
2a2de19413e7 mod_admin_blocklist/README: Turns out autolink.lua doesn't know about official modules
Kim Alvefur <zash@zash.se>
parents: 2315
diff changeset
12 will be allowed to or from that domain.
5017
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
13
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
14 # Configuring
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
15
5976
bd0b4d8aa94e mod_admin_blocklist: Update README Compability Section
Menel <menel@snikket.de>
parents: 5975
diff changeset
16 The role or roles that determine whether a
5017
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
17 particular users blocklist is used can be configured:
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
18
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
19 ```lua
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
20 -- This is the default:
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
21 admin_blocklist_roles = { "prosody:operator", "prosody:admin" }
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
22 ```
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
23
6075
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
24 # Compatibility
5017
96e83b4a93f7 mod_admin_blocklist: Add config option for which role(s) to consider (0.12+)
Kim Alvefur <zash@zash.se>
parents: 2316
diff changeset
25
6075
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
26 Prosody-Version Status
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
27 --------------- ------
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
28 trunk* Works
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
29 0.12 Works
5976
bd0b4d8aa94e mod_admin_blocklist: Update README Compability Section
Menel <menel@snikket.de>
parents: 5975
diff changeset
30
6075
0e0c6618e154 mod_admin_blocklist: fix typo
Menel <menel@snikket.de>
parents: 5976
diff changeset
31 *as of 2024-12-21