Commit Graph

63 Commits

Author SHA1 Message Date
Mia
2ff6a5b98d Chat-monitor: Add more commonly-used evasions 2022-04-22 19:30:59 -05:00
Mia
3bfe1d7935 Chat-monitor: Stop requiring filter names in /filter test 2022-03-17 16:54:53 -05:00
Mia
8a06826bfa Add /noforcerename
Requested by Aeonic. This makes it so the Punishments.namefilterwhitelist now makes users outright immune to FRs, instead of just having it logged / immune to one FR. If they're on the namefilter whitelist, they have to be taken off before they can be renamed, as opposed to just being able to log onto the acc anyway. It also ensures only US can add / remove to that list.
2021-10-11 19:19:29 -05:00
Mia
d6415445d0 Improve offine forcerenames
This mostly just sets user.trackRename when the user tries to log in for the first time. Requested by DaWoblefet.
2021-09-22 19:13:07 -05:00
Mia
a735d1fa54 Filters: Validate falsy terms
Apparently we did not do this before.
2021-09-06 14:08:20 -05:00
Mia
7811795344
Handle new TypeScript version (#8449)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-08-30 20:11:44 -07:00
Mia
ddd8205aa0 Chat-monitor: Upload replays for BattleMonitor mutes 2021-07-21 13:28:15 -05:00
Annika
c5f881b76f More fixes for ts-node 2021-07-10 16:33:04 -04:00
Mia
59c404c8c4
Chat-monitor: Wrap autolocked messages in code formatting 2021-06-24 14:00:44 -05:00
Annika
f0d142e621 Chat monitor: Fix bug in loading from JSON 2021-05-30 15:55:54 -07:00
Mia
69990a6ddc Chat-monitor: Fix crash 2021-05-30 01:40:14 -05:00
Mia
5f9072b2ba
Chat-monitor: Centralize functions and migrate to JSON (#8328) 2021-05-29 22:11:32 -07:00
Guangcong Luo
d555f6fe0d Fix max-len for long regexes
We use eslint-disable for max-len in a lot of places where we don't
actually need it. This fixes that.
2021-05-23 20:48:31 -07:00
Mia
e83b030c09 Chat-monitor: Ensure users receive offline warns with no reason
In practice, it shouldn't happen much, but it never hurts to ensure proper behavior.
2021-05-13 15:31:25 -05:00
Mia
f949f9ba66 Chat-monitor: Use new spoiler format instead of SPOILER:
Mentioned in Staff, slightly cleaner.
2021-05-06 13:21:54 -05:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Mia
e9b1bfe5f0 Chat-monitor: Fix /filter help
(CommandContext#run does not work for help commands that are arrays)
2021-04-21 08:30:19 -05:00
Kris Johnson
a0c3f105b2
Add /filter test (#8197) 2021-04-14 10:15:25 -07:00
Annika L
583dceb693 Chat monitor: Weeklock for slurs in Pokemon nicknames 2021-04-08 22:18:38 -07:00
Annika
6806b8c3ac Chat monitor: Weeklock for slur evasion 2021-04-06 12:42:42 -07:00
Mia
294e3a4a57
Chat monitor: Refactor to handle private filters better (#8112) 2021-04-01 15:35:37 -07:00
Mia
6259ce27f8 Chat-monitor: Properly modlog /allowname names 2021-03-17 14:07:37 -05:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Annika
2a54d9d82e
Chat monitor: Add ƞ to evasion regexes 2021-01-07 12:32:59 -08:00
Annika
f2bfc82ca1
Chat monitor: Improve the handling of usernames (#7786)
* Chat monitor: Improve the handling of usernames

This PR ignores word boundaries in evasion regexes when filtering usernames, preventing the use of usernames with evasions of slurs in them.

* properly fix merge conflicts
2020-12-14 12:55:11 -08:00
Annika
b7c3e6cff2 Chat monitor: Add Unicode support to regexes
This should fix the issues with the filter thinking that `🐺ℕ𝕚𝕟𝕖𝕥𝕒𝕝𝕖𝕤-𝔸𝕝𝕠𝕝𝕒🐺` was the T-slur.
2020-12-13 14:51:46 -08:00
Annika
c87a4669c5 Properly prevent reuse of forcerenamed names
af36329377 identified the bug, but moved it into the wrong filter. third time's the charm?
2020-12-02 23:26:56 -08:00
Annika
59a33fc2d0 Chatmonitor: Improve evasion handling in nicknames
Don't autolock users who use the slur verbatim without attempting to evade
2020-12-01 23:08:40 -08:00
Mia
0afd5cb54b
Punishments: Show users a warn message on login for offline warns (#7741) 2020-12-01 07:02:54 -08:00
Mia
186677239d
Nicknamefilter: Support hiding nicks from filters (#7751) 2020-12-01 06:21:17 -08:00
Annika
a1b085f033
Chat monitor: Support unit tests (#7710) 2020-11-26 01:33:09 -08:00
Mia
af36329377
Filters: Properly stop forcerenamed names from being used (#7709) 2020-11-19 05:08:22 -08:00
Annika
06cbdada99
Don't allow forcerenamed usernames to be reused (#7609) 2020-10-31 05:54:17 -07:00
Annika
f2a4798bb8
Chatfilters: Fix reasons displaying as undefined (#7579) 2020-10-27 19:44:53 -07:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Annika
c9d62d944e
Chatfilters: Fix wordfilter storage (#7530) 2020-10-17 23:13:28 -07:00
asgdf
8eb9a40263
Add more letter substitutions to filter (#7470) 2020-10-05 14:23:39 -07:00
Guangcong Luo
3d68248efa Update to latest eslint
We're skipping two major typescript-eslint versions, so there are a
bunch of changes here, including:

- it's catching a lot of things it didn't catch in the past, for
  reasons unclear to me

- no-unused-vars has to be explicitly disabled in global-types now

- a lot of `ts-ignore`s were never necessary and have been fixed

- Crashlogger can now handle being thrown things that aren't errors.
  This has never been a problem in the past, but to satisfy TypeScript
	we might as well not die in a fire on the off chance someone tries to
	`throw null` or something.
2020-09-29 15:28:08 -07:00
Annika
6e2a336975 Don't duplicate attributions in modlog entries 2020-09-28 15:26:30 -07:00
Mia
ae7a46dd37
Chat: Move forcerename tracking to Monitor and Punishments (#7381) 2020-09-19 02:04:49 -07:00
Annika
59ba8aa876
Chat filters: Support custom redtext (#7392) 2020-09-18 20:38:53 -07:00
Quinton Lee
bf400c4ef1
Restore global bot permissions for /filters list (#7385) 2020-09-18 05:08:51 -07:00
Annika
357131ec68
Escape regexes in the filter display page
Lookbehind regexes cause problems....
2020-09-16 15:36:08 -07:00
Annika
471fe7365a
Add "η" to the evasion filter (#7330)
See https://replay.pokemonshowdown.com/gen8nationaldex-1182878993 for an example of how this can be used to evade.
2020-09-07 12:49:11 -07:00
Annika
8789d619f6
Chatfilters: Spoiler autolocking banwords (#7295) 2020-09-06 17:53:33 -07:00
Mia
44fc0123ad
Chat: Refactor CommandContext and PageContext to use ErrorMessage more (#7234) 2020-09-06 00:15:16 -07:00
Annika
6931e59df7
Improve Pokémon nickname filter and autolocks (#7253) 2020-08-23 20:41:51 -07:00
Annika
5df47bb388
Allow staff to partially bypass the status filter (#7213) 2020-08-23 04:28:10 -07:00
Annika
ff1cb70a95
Handle evasion filters in Pokémon nicknames (#7246) 2020-08-22 01:26:07 -07:00
Guangcong Luo
98b5956d93 Linkify TextMonitor roomids 2020-07-28 20:08:27 -04:00