Commit cd7ba4a
authored
Refactor all moderation features, auto mod and notes. Add reports and modlog. (#1095)
This is a complete rewrite and restructure of protect and everything related to it.
protect.py was split into:
commands/moderator.py
commands/purge.py
core/moderation.py
functions/automod.py
functions/paste.py
Two additional files were added:
commands/modlog.py
commands/report.py
who.py was split into:
commands/notes.py
commands/whois.py
commands/moderator.py:
Moved all moderator actions into slash commands
Adds a new /unwarn command allowing individual warnings to be removed
Logs and displays who warned people (Fixes #657)
Mute can now have both a duration and a reason (fixes #721)
commands/modlog.py
Completely new feature, copying carlbots /modlog highscores and ban/unban logging
This additionally adds the ability to lookup bans by user or moderator
Bans are now forever stored in TS database (Fixes #380)
commands/notes.py
All the notes editing commands, as well as a /notes all
Write roles checks now check reader roles as well (fixes #692)
Makes notes all paginated (fixes #800)
Notes reader/writer now only send one message if config is empty (fixes #983)
commands/purge.py
Moves purge command to /purge
Combines the duration and exact command
commands/whois.py
Is the /whois command
core/moderation.py
This handles the core actions of ban/unban/kick/mute/unmute/warn/unwarn and a few core logic items, like getting all warnings
functions/automod.py
Completely rewrites automod (Fixes #463)
Fixes regex not working (no issue for this one)
Adds a mute feature for automod (Fixes #1020)
Adds automod as a framework instead of a strict class, allowing other modules to run messages through automod
Adds IRC checks to automod (Fixes #212)
functions/paste.py
Paste now makes sure that the linx API request worked and that the message was sent BEFORE deleting the original message (Fixes #1077)
Paste checks if message violates automod, and if it was recommended that it was deleted, nothing happens
Other:
Who now shows new warning information (Fixes #180)
Moves duck to use the new core/moderation.py feature1 parent 6c521f1 commit cd7ba4a
21 files changed
Lines changed: 3291 additions & 1766 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
| 397 | + | |
| 398 | + | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
400 | 403 | | |
401 | 404 | | |
402 | 405 | | |
| |||
0 commit comments