Commit Graph

96 Commits

Author SHA1 Message Date
sparksblade
c528075dc7
Fix abilitysearch for special char separators (#8872) 2022-08-24 20:49:09 -07:00
Mia
5925f4b7b0
Remove prefix-manager timeout tests 2022-06-17 07:39:12 -05:00
Kris Johnson
758356a55d
Add a timeout for userprefixes (#8667) 2022-02-22 17:44:48 -08:00
Mia
fa8f7a3e50
SQL: Propagate errors to the parent process (#8613) 2022-01-05 17:56:52 -08:00
Annika
57f19246a8 Trivia: Support a cycle-specific leaderboard 2021-12-11 18:13:20 -08:00
Guangcong Luo
7017dcb8f9 Mark tests using IPTools.lookup with "(network)"
(Also mark them with "(slow)" to skip them during a normal `npm test`.)

This is mostly the result of a particularly frustrating debugging
session when I couldn't figure out why these tests were timing out
(it turns out, it was because my DNS was broken so `IPTools.lookup` was
timing out). Marking them with "(network)" should make similar
situations less frustrating in the future.
2021-11-05 21:58:28 -04: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
8cf1035ee2
SQL: Automatically prepare statements unless told otherwise (#8439) 2021-08-18 12:51:39 -07:00
Annika
1a41721aba Trivia: Make unit tests work without SQLite 2021-08-14 20:48:37 -07:00
Annika
0a33b52ad4 Trivia: Use transactions and split into a directory 2021-08-14 20:35:08 -07:00
Annika
dcb96fa7ed Trivia: Refactor to use SQLite as a storage backend 2021-08-14 20:35:08 -07:00
Annika
82a1510564 Modlog: Fix note search testing 2021-08-13 19:00:18 -07:00
Annika
6fdfd74f76 Modlog: Unskip and fix unit tests 2021-08-09 14:42:01 -07:00
Annika
633e061067 Modlog: Remove text logging code 2021-08-09 14:06:14 -07:00
Annika
bcbe100c41
Modlog: Use SQLite for searches (#8004) 2021-07-23 13:47:49 -07:00
Mia
e5fbd64427
Support adding friends (#7333) 2021-07-16 12:56:34 -07:00
Annika
52a9378361 Trivia: Support combining multiple categories 2021-07-13 16:01:03 -07:00
Annika
6ed55b6d1f
IPTools: Add sanity checks (#8331) 2021-07-09 19:59:45 -07:00
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Annika
c87bf685bb Fix Punishments tests 2021-07-01 16:33:03 -07:00
Annika
a80ce32b1f Punishments: Add broader, more integrated tests 2021-06-29 17:55:45 -07:00
Annika
9d87d9bac2 Fix Punishments#ipSearch 2021-06-08 14:08:36 -07:00
Mia
09e298f15b
Punishments: Support giving multiple punishments to one user (#8265) 2021-05-31 11:06:01 -07:00
Mia
5f9072b2ba
Chat-monitor: Centralize functions and migrate to JSON (#8328) 2021-05-29 22:11:32 -07:00
Annika
83df279b1d
Add a chat plugin to manage username prefixes (#8338) 2021-05-26 14:39:13 -07:00
Annika
1c3f6402f0
Tests: Use assert.equal and assert.notEqual more (#8276) 2021-05-07 23:51:18 -07:00
Annika
f6b21b90ce Trivia: Support games with fewer than 3 players
Requested by Trivia roomstaff
2021-05-02 21:36:22 -07:00
Guangcong Luo
486f292904
Refactor everything to use Utils.sortBy (#8220)
A few uses of `array.sort()` have been left alone:

- sorting in `data/` because they aren't supposed to import anything

- `set-importer` because I still have no clue what that's for and what
  dependencies it is/isn't allowed to have

- `sort()` with no arguments used as a lexical sort (at which point
  `sortBy` offers no benefits)

All other cases have been replaced with `Utils.sortBy`, which should
be a massive increase in readability.

Sort orders should be much more readable now, without needing to puzzle
through sign issues. The order is always low-to-high, A-to-Z,
true-to-false.
2021-04-23 22:41:00 -07:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -07:00
Christopher Monsanto
99fd7b8706
Chat: Implement Discord spoilers (#7948) 2021-04-09 01:39:47 -07:00
Guangcong Luo
44ef998ecc Implement free-for-all
This involves a huge refactor for how battles are constructed, but
it's totally worth it.

Currently, tournaments, challenges, and laddering are unsupported; only
unrated searches work. But it does work, and it's beautiful.
2021-04-01 04:44:16 -07:00
Annika
c1fa436e35 Trivia: Implement a /trivia unrankednew command
This enables the creation of Trivia officials that do not reward points.
2021-03-20 12:30:46 -07:00
Mia
07b1c01f75
Support hotpatching User/Room/ProcessManager protos (#8095) 2021-03-08 05:23:17 -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
Adam Tran
14744879c8
Fix excluding variables in /ms (#7859) 2021-01-18 11:42:58 -06:00
Guangcong Luo
a68656a8e7 Support destroying rooms in unit tests
Matchmaking unit tests currently rely on destroying and re-creating a
user causing them to forget about battles they're in, which is not
actually supposed to happen, and breaks #7815.
2021-01-10 03:39:01 -08:00
Guangcong Luo
66fe68e8ee Tests: Refactor users-utils
The old users-utils had an unnecessarily difficult-to-use API. This
new one should be more straightforward and unified.
2021-01-09 22:33:32 -08:00
Adam Tran
6702decd95
Add Pivot moves as a /ms category (#7822)
* draft test

* Move search for pivot moves
2020-12-26 21:57:03 -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
a1b085f033
Chat monitor: Support unit tests (#7710) 2020-11-26 01:33:09 -08:00
Mia
6145fab828
Allow the Help auto-response filter to be used in all rooms (#7645) 2020-11-08 20:16:25 -08:00
Annika
ec0a92469a Modlog: Make tests work without SQLite 2020-11-05 22:40:53 -08:00
Annika
aa069ce8fd
Support disabling modlogs (#7619)
Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-11-02 22:59:31 -05:00
Annika
2f130e8762
Modlog: Support logging to a SQLite database (#7513)
* Modlog: Support logging to a SQLite database

Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-10-30 19:27:25 -04:00
Guangcong Luo
d6eeb197c1 Improve Chat.toDurationString
- Default precision is now 3.

  (Instead of "3 months 25 days 17 hours 46 minutes 40 seconds", it'll
	say "3 months 25 days 17 hours". You can still set the precision to
	`Infinity` if you actually prefer that.)

- Now displays "forever" for Infinity or overflow durations

- No longer skips blank precision levels

  (Shows "3 hours 0 minutes 10 seconds" instead of
	"3 hours  10 seconds")
2020-10-21 13:05:08 +01:00
Guangcong Luo
a65faf263f
Stop using assert.strict.strictEqual (#7515)
It turns out that when I switched us from `assert` to `assert.strict`,
I didn't actually update any existing tests or tell anyone:

0df0d234f2

So apparently everyone else just kept on using `strictEqual`.

This will be a PR and also throw an error if people continue trying to
use it, which should make it much clearer what PS policy is on this.

A lot of the problem may be that TypeScript marks assert.strict.equal
as deprecated when it's not. This was fixed 4 days ago:

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48452

But this probably hasn't made it to a thing yet. Until then, you'll
have to deal with TS marking your tests as deprecated, but it shouldn't
be too long.

Accidentally using `assert` instead of `assert.strict` should now show
an error. This protects against the probably much worse mistake of
accidentally using `assert.equal` rather than `assert.strict.equal`.

`assert.ok` is also deprecated now.
2020-10-14 01:19:03 -07:00
Kris Johnson
d9b3a510ad
TextFormatter: Support replacing \n without trusted (#7507) 2020-10-11 13:38:34 -07:00
Kris Johnson
b107236dc5
Repeats: Refactor storing and deleting repeats, let people repeat room FAQs (#7488) 2020-10-07 23:42:30 -07:00
Mia
4279d1f3bc
Update attributions in various locations (#7354) 2020-10-06 15:55:26 -07:00