Skip to content

Commit

Permalink
Improve exemption documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
SadieCat committed Jan 20, 2025
1 parent d836413 commit 6c63c7d
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/4/configuration/_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ attributes:
required: false
default: null
description: |-
The privileges to exempt ranked channel users from. See the notes for [the exemptchanops module](/4/modules/exemptchanops) for more information.
The privileges to exempt ranked channel users from. See the [the exemptions page](/4/exemptions) for more information.
- name: extbanformat
type: Text
required: false
Expand Down
37 changes: 37 additions & 0 deletions docs/4/exemptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: v{{ version }} Exemptions
---

## Exemptions

Exemptions allow exempting users with a channel prefix mode from channel restrictions.

### Core

!!! note ""
Core exemptions are exemptions which are always available. For details on the exemptions provided by modules, see the modules section below.

Name | Description
--------- | -----------
topiclock | Allows exempted users to change the channel topic.

### Modules

<table markdown="1">
<thead>
<tr>
<th>Name</th>
<th>Module</th>
<th>Description</th>
</tr>
</thead>
<tbody markdown="1">
{% for exemption in module_exemptions|sort(attribute="name") %}
<tr markdown="1">
<td markdown="1">{{ exemption.name }}</td>
<td markdown="1">[{{ exemption.module }}](/{{ version }}/modules/{{ exemption.module }}/)</td>
<td markdown="1">{{ exemption.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
21 changes: 1 addition & 20 deletions docs/4/modules/exemptchanops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,4 @@ chmodes:
/MODE #channel +X regmoderated:o
special_notes: |-
The modules which ship with InspIRCd define the following restrictions:
Name | Description
-------------- | -----------
anticaps | Exempts users from channel mode `B` (anticaps). Requires [the anticaps module](/4/modules/anticaps).
auditorium-see | Exempts from the user list being hidden by channel mode `u` (auditorium). Requires [the auditorium module](/4/modules/auditorium).
auditorium-vis | Exempts from being hidden from the user list by channel mode `u` (auditorium). Requires [the auditorium module](/4/modules/auditorium).
blockcolor | Exempts users from channel mode `c` (blockcolor). Requires [the blockcolor module](/4/modules/blockcolor).
delaymsg | Exempts users from channel mode `d` (delaymsg). Requires [the delaymsg module](/4/modules/delaymsg).
filter | Exempts users from channel mode `g` (filter). Requires [the chanfilter module](/4/modules/chanfilter).
flood | Exempts users from channel mode `f` (flood). Requires [the messageflood module](/4/modules/messageflood).
nickflood | Exempts users from channel mode `F` (nickflood). Requires [the nickflood module](/4/modules/nickflood).
noctcp | Exempts users from channel mode `C` (noctcp). Requires [the noctcp module](/4/modules/noctcp).
nonick | Exempts users from channel mode `N` (nonick). Requires [the nonicks module](/4/modules/nonicks).
nonotice | Exempts users from channel mode `T` (nonotice). Requires [the nonotice module](/4/modules/nonotice).
opmoderated | Exempts users from channel mode `U` (opmoderated). Requires [the opmoderated module](/4/modules/opmoderated).
regmoderated | Exempts users from channel mode `M` (regmoderated). Requires [the account module](/4/modules/account).
repeat | Exempts users from channel mode `E` (repeat). Requires [the repeat module](/4/modules/repeat).
stripcolor | Exempts users from channel mode `S` (stripcolor). Requires [the stripcolor module](/4/modules/stripcolor).
topiclock | Exempts users from channel mode `t` (topiclock).
A list of exemptions can be found on [the exemption page](/4/exemptions).
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ title: Introduction
- [Extended Bans](/4/extended-bans)
- [User Modes](/4/user-modes)
- [Modules](/4/modules)
- [Exemptions](/4/exemptions)
- [SNOMasks](/4/snomasks)
- [Change Log](/4/change-log)
- [Overview of v4](/4/overview)
Expand Down
1 change: 1 addition & 0 deletions mkdocs_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ nav:
- Extended Bans: 4/extended-bans.md
- User Modes: 4/user-modes.md
- Modules: 4/modules/index.md
- Exemptions: 4/exemptions.md
- SNOMasks: 4/snomasks.md
- Change Log: 4/change-log.md
- Downloads: https://github.com/inspircd/inspircd/releases/latest
Expand Down
10 changes: 10 additions & 0 deletions mkdocs_inspircd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ def umodes(self, config, version):
for mode in module["umodes"]["chars"]
]

def exemptions(self, config, version):
modules = self.modules(config, version)
return [
{**exemption, "module": module["name"]}
for module in modules
if "exemptions" in module
for exemption in module["exemptions"]
]

def extbans(self, config, type, version):
modules = self.modules(config, version)
return [
Expand Down Expand Up @@ -222,6 +231,7 @@ def on_page_markdown(self, markdown, page, config, files):
context = {
"module_chmodes": self.chmodes(config, version),
"module_umodes": self.umodes(config, version),
"module_exemptions": self.exemptions(config, version),
"acting_module_extbans": self.extbans(config, "Acting", version),
"matching_module_extbans": self.extbans(config, "Matching", version),
"module_snomasks": self.snomasks(config, version),
Expand Down

0 comments on commit 6c63c7d

Please sign in to comment.