Commit Graph

110 Commits

Author SHA1 Message Date
Mia
2f0052c3ce Abuse-monitor: Explicitly mark punishments by Artemis 2022-04-22 20:53:15 -05:00
Annika
0ad8a0df80 Make shared IPs only avoid punishments on that IP 2022-02-21 16:03:15 -08:00
Mia
71d5f4c790 Punishments: Don't load invalid/empty IPs 2021-12-09 10:27:34 -06:00
Mia
706ed51cb9 Punishments: Fix checkName only acting on the first punishment the user has
This created some bugs where a gbanned user wasn't disconnected if they switched IPs, since this previously only checked the first punishment. If they had a lock, or something similar, it would only run that, and not the gban. This runs everything, fixing that.
2021-11-03 20:18:14 -05:00
Mia
6b3b4df6fa Fix build 2021-10-27 09:23:38 -05:00
Mia
78291269bb Punishments: Fix markshared IP storage 2021-10-27 08:02:49 -05:00
Mia
899549667d Fix build 2021-10-25 20:32:12 -05:00
Mia
00eeea1892 Punishments: Fix unmarksharing ranges 2021-10-25 14:41:21 -05:00
Mia
bd38434a2b Punishments: Don't count custom room punishments toward PunishmentMonitor 2021-10-24 20:02:17 -05:00
Mia
2b5692a787 Punishments: Fix crash 2021-10-24 15:25:12 -05:00
Mia
88ef7fdf1f
Support marksharing ranges (#8498) 2021-10-24 12:44:46 -07:00
Mia
3372e6368b Punishments: Sanitize name whitelist data 2021-10-12 10:46:38 -05:00
Mia
c19309c1ad Moderation: Support year-locking names
Approved by Aeonic and Teclis.
2021-09-20 18:10:28 -05:00
Mia
55ced133b6 Punishments: Fix validation of ranges in sharedIpBlacklist 2021-09-20 08:42:33 -05:00
Kris Johnson
508c527207 Fix build 2021-09-13 21:49:29 -06:00
Kris Johnson
ff13a8d8a3 Usersearch: Exclude global banned users 2021-09-13 21:47:49 -06:00
Mia
51880db89c Punishments: Move punishments on room rename 2021-08-12 13:28:10 -05:00
Annika
bcbe100c41
Modlog: Use SQLite for searches (#8004) 2021-07-23 13:47:49 -07:00
Annika
6ed55b6d1f
IPTools: Add sanity checks (#8331) 2021-07-09 19:59:45 -07:00
Annika
56754afb42 Punishments: Remove getPunishType functions
These are poorly designed as they only return one punishments, but users can now have several.
2021-06-29 17:55:45 -07:00
Mia
3eeccb002e Punishments: Make /unlock lift /yearlockname 2021-06-23 21:52:19 -05:00
Mia
d03ba1c25e Punishments: Better handle custom punishments 2021-06-11 02:05:44 -05:00
Annika
c3d4f80b6e Punishments: Remove unnecessary check 2021-06-08 14:14:58 -07:00
Annika
9d87d9bac2 Fix Punishments#ipSearch 2021-06-08 14:08:36 -07:00
Mia
6dac7566d8 Punishments: Check interactions on room punishments 2021-06-07 12:32:18 -05:00
Annika
b712278fd0
Use global punishments instead of fake rooms (#8350) 2021-06-02 21:54:33 -07:00
Mia
eaacf70494 Punishments: Attempt to reduce RAM use
This is one of several possible causes I identified. Worst case, we can restore this later, but it isn't critical at any rate.
2021-06-01 08:53:24 -05:00
Mia
607c645316 Punishments: Fix saving of several punishments 2021-06-01 08:28:36 -05:00
Mia
09e298f15b
Punishments: Support giving multiple punishments to one user (#8265) 2021-05-31 11:06:01 -07:00
Guangcong Luo
74211859c9 Update to TypeScript 4.3
Changes relevant to our codebase:

- TypeScript now knows that `typeof id === 'string'`! A bunch of casts
  on `User | ID` or `Room | RoomID` are no longer necessary!!!

- `override` will protect against certain typoes, and we'll adopt it
  (and `--noImplicitOverride`) as soon as sucrase comes in

- `declare` is now required for properties we want to narrow the type
  of without directly overwriting - a good thing to use going forward,
	but very annoying to fix all our old code for
2021-05-26 14:16:54 -07:00
Guangcong Luo
d8f492d209 Fix bugs in IP and IP range support
IPTools has gotten a bit buggy since the last time I looked at it. This
fixes `IPTools.ipRegex` to actually validate IPs, and adds a new
`IPTools.isValidRange` validation function.

`/ipsearch` now also supports all three IP range formats, thanks to
being refactored to use `IPTools.checker`.

Fixes #8330
2021-05-23 20:48:31 -07:00
Annika
2837f9dc26 Handle undefined reason in monitorRoomPunishments 2021-05-06 10:17:36 -07:00
Kris Johnson
70a06de929
PunishmentMonitor: Fix "(banned: )" in autolocks (#8256) 2021-05-04 21:50:04 -07:00
Mia
d992b8f5fa
Add more support for custom punishments (#8215) 2021-04-23 22:40:31 -07:00
Mia
cec237ddff Remove extraneous 2021-04-22 08:35:36 -05:00
Mia
54e2c74630 Punishments: Fix markshared blacklist loading 2021-04-22 08:35:07 -05:00
Mia
b9d6b3e3f3
Punishments: Don't warn / mark staff users in banned groupchats (#7669) 2021-03-26 15:29:41 -07:00
Mia
fc75878432 Fix loading ranges in Punishments.sharedIPBlacklist 2021-03-26 09:26:03 -05:00
Mia
b02f44b1f1 Fix build 2021-03-18 10:14:16 -05:00
Mia
f8cea3e4a0 Fix namelocks not applying properly 2021-03-07 19:54:02 -06:00
Annika
e4f02e77cb Punishments: Disconnect unregistered banned users
Globally banned users should always be disconnected if they are reusing their username. However, the punishments should only be applied to the user object if it's a registered name, in case someone accidentally logs into a banned name.
2021-02-25 18:20:54 -08:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Guangcong Luo
da30a71706 Revert "Remove User#inRooms and User#games (#7815)"
This reverts commit 5c9c84c415.

This also reverts commit 1fc92ef977.
2021-01-30 15:55:55 -05:00
Mia
5c9c84c415
Remove User#inRooms and User#games (#7815) 2021-01-28 10:41:35 -08:00
Mia
11e4dcd272
Support using more moderation commands offline (#7742) 2021-01-28 10:41:24 -08:00
Annika
70e41af150 Include rangelocks in Punishments#getPunishments 2021-01-24 22:10:47 -08:00
Mia
996f8c766e
Punishments: Support ranges in /nomarkshared (#7913) 2021-01-15 17:38:13 -08:00
Mia
ca94dea20f
FS: Fix hotpatching and add more throttling (#7878)
- `writeUpdate` state is now stored in a global variable, so hotpatching doesn't crash it
- throttling now writes on the tail (so two throttled `writeUpdate` calls will write one update, not two)
- room settings, punishments, and helptickets are now throttled
2021-01-09 15:49:30 -08:00
Guangcong Luo
d4876ff303 Improve safety of Punishments hotpatching 2020-12-28 08:50:42 -05:00
Annika
65bf84d88f Punishments: Fix bug with checkPunishmentTime
Apparently optional chaining doesn't work in setTimeout callbacks, since Sucrase implements it as its own function.
2020-12-02 23:31:37 -08:00