Skip to content

Commit 6c63c7d

Browse files
committed
Improve exemption documentation.
1 parent d836413 commit 6c63c7d

File tree

6 files changed

+51
-21
lines changed

6 files changed

+51
-21
lines changed

docs/4/configuration/_options.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ attributes:
2525
required: false
2626
default: null
2727
description: |-
28-
The privileges to exempt ranked channel users from. See the notes for [the exemptchanops module](/4/modules/exemptchanops) for more information.
28+
The privileges to exempt ranked channel users from. See the [the exemptions page](/4/exemptions) for more information.
2929
- name: extbanformat
3030
type: Text
3131
required: false

docs/4/exemptions.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: v{{ version }} Exemptions
3+
---
4+
5+
## Exemptions
6+
7+
Exemptions allow exempting users with a channel prefix mode from channel restrictions.
8+
9+
### Core
10+
11+
!!! note ""
12+
Core exemptions are exemptions which are always available. For details on the exemptions provided by modules, see the modules section below.
13+
14+
Name | Description
15+
--------- | -----------
16+
topiclock | Allows exempted users to change the channel topic.
17+
18+
### Modules
19+
20+
<table markdown="1">
21+
<thead>
22+
<tr>
23+
<th>Name</th>
24+
<th>Module</th>
25+
<th>Description</th>
26+
</tr>
27+
</thead>
28+
<tbody markdown="1">
29+
{% for exemption in module_exemptions|sort(attribute="name") %}
30+
<tr markdown="1">
31+
<td markdown="1">{{ exemption.name }}</td>
32+
<td markdown="1">[{{ exemption.module }}](/{{ version }}/modules/{{ exemption.module }}/)</td>
33+
<td markdown="1">{{ exemption.description }}</td>
34+
</tr>
35+
{% endfor %}
36+
</tbody>
37+
</table>

docs/4/modules/exemptchanops.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,4 @@ chmodes:
1919
/MODE #channel +X regmoderated:o
2020
2121
special_notes: |-
22-
The modules which ship with InspIRCd define the following restrictions:
23-
24-
Name | Description
25-
-------------- | -----------
26-
anticaps | Exempts users from channel mode `B` (anticaps). Requires [the anticaps module](/4/modules/anticaps).
27-
auditorium-see | Exempts from the user list being hidden by channel mode `u` (auditorium). Requires [the auditorium module](/4/modules/auditorium).
28-
auditorium-vis | Exempts from being hidden from the user list by channel mode `u` (auditorium). Requires [the auditorium module](/4/modules/auditorium).
29-
blockcolor | Exempts users from channel mode `c` (blockcolor). Requires [the blockcolor module](/4/modules/blockcolor).
30-
delaymsg | Exempts users from channel mode `d` (delaymsg). Requires [the delaymsg module](/4/modules/delaymsg).
31-
filter | Exempts users from channel mode `g` (filter). Requires [the chanfilter module](/4/modules/chanfilter).
32-
flood | Exempts users from channel mode `f` (flood). Requires [the messageflood module](/4/modules/messageflood).
33-
nickflood | Exempts users from channel mode `F` (nickflood). Requires [the nickflood module](/4/modules/nickflood).
34-
noctcp | Exempts users from channel mode `C` (noctcp). Requires [the noctcp module](/4/modules/noctcp).
35-
nonick | Exempts users from channel mode `N` (nonick). Requires [the nonicks module](/4/modules/nonicks).
36-
nonotice | Exempts users from channel mode `T` (nonotice). Requires [the nonotice module](/4/modules/nonotice).
37-
opmoderated | Exempts users from channel mode `U` (opmoderated). Requires [the opmoderated module](/4/modules/opmoderated).
38-
regmoderated | Exempts users from channel mode `M` (regmoderated). Requires [the account module](/4/modules/account).
39-
repeat | Exempts users from channel mode `E` (repeat). Requires [the repeat module](/4/modules/repeat).
40-
stripcolor | Exempts users from channel mode `S` (stripcolor). Requires [the stripcolor module](/4/modules/stripcolor).
41-
topiclock | Exempts users from channel mode `t` (topiclock).
22+
A list of exemptions can be found on [the exemption page](/4/exemptions).

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ title: Introduction
3737
- [Extended Bans](/4/extended-bans)
3838
- [User Modes](/4/user-modes)
3939
- [Modules](/4/modules)
40+
- [Exemptions](/4/exemptions)
4041
- [SNOMasks](/4/snomasks)
4142
- [Change Log](/4/change-log)
4243
- [Overview of v4](/4/overview)

mkdocs_dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ nav:
1717
- Extended Bans: 4/extended-bans.md
1818
- User Modes: 4/user-modes.md
1919
- Modules: 4/modules/index.md
20+
- Exemptions: 4/exemptions.md
2021
- SNOMasks: 4/snomasks.md
2122
- Change Log: 4/change-log.md
2223
- Downloads: https://github.com/inspircd/inspircd/releases/latest

mkdocs_inspircd/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ def umodes(self, config, version):
119119
for mode in module["umodes"]["chars"]
120120
]
121121

122+
def exemptions(self, config, version):
123+
modules = self.modules(config, version)
124+
return [
125+
{**exemption, "module": module["name"]}
126+
for module in modules
127+
if "exemptions" in module
128+
for exemption in module["exemptions"]
129+
]
130+
122131
def extbans(self, config, type, version):
123132
modules = self.modules(config, version)
124133
return [
@@ -222,6 +231,7 @@ def on_page_markdown(self, markdown, page, config, files):
222231
context = {
223232
"module_chmodes": self.chmodes(config, version),
224233
"module_umodes": self.umodes(config, version),
234+
"module_exemptions": self.exemptions(config, version),
225235
"acting_module_extbans": self.extbans(config, "Acting", version),
226236
"matching_module_extbans": self.extbans(config, "Matching", version),
227237
"module_snomasks": self.snomasks(config, version),

0 commit comments

Comments
 (0)