Commit Graph

39 Commits

Author SHA1 Message Date
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Mia
727d6a4498
Monitor: Standardize slow logging (#7969) 2021-01-30 13:32:06 -08:00
Guangcong Luo
f4abf52f61 Fix QueryProcessManager type signatures 2021-01-30 11:35:35 -08:00
Annika
353a81e3d4 Modlog: Properly implement timing of searches 2021-01-30 10:51:33 -08:00
Annika
9edf0ad456 Modlog: Increase PM timeout to 30 minutes 2020-12-26 20:30:17 -05:00
Mia
9712f6ecf1
Modlog: Remove Rooms global in PM (#7799) 2020-12-13 12:52:52 -08:00
Annika
23aca7383b Modlog: Support debugging the ProcessManager 2020-12-01 01:49:17 -05:00
Annika
059452dc0d
Modlog: Move type signatures into Map constructors 2020-11-06 11:54:16 -08:00
Annika
ec0a92469a Modlog: Make tests work without SQLite 2020-11-05 22:40:53 -08:00
Annika
202bb7affe Modlog: Properly clean up streams
We don't need a reason to differentiate between whether or not a modlog stream was never initialized or was previously destroyed, and we don't need a Map with 8.2 million keys.
2020-11-03 15:44:57 -08:00
Annika
aa069ce8fd
Support disabling modlogs (#7619)
Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-11-02 22:59:31 -05:00
Mia
89d127eafd
ProcessManager: Add a static execFile (#7566) 2020-11-02 11:35:07 -08:00
Annika
dab9f570f1 Modlog: Don't write alts if there are no alts 2020-11-01 16:25:36 -08:00
Annika
7f2dec0797
Modlog: Avoid optional properties in ModlogEntry (#7613)
* Modlog: Avoid optional properties in ModlogEntry

* Use a type

* Make IP nullable

* Add NOT NULL constrains

* Fix typo
2020-11-01 14:07:01 -08:00
Annika
06535b4235 Modlog: Disallow duplicates in ModlogEntry#alts 2020-10-31 14:13:23 -07:00
Annika
58d8a2af70 Fix API for writing to the global modlog 2020-10-30 16:57:29 -07:00
Annika
b9d993495d Modlog: Fix crash in writing global modlog 2020-10-30 16:36:55 -07: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
e8451f8104 Clean up imports
A lot of our code for child processes doesn't really follow our
original standards. This refactors them back to work the way they
were intended to.
2020-10-24 22:12:35 +01:00
Mia
fb3b6e3886
Move Battlesearch to its own file (#7481) 2020-10-24 10:52:52 -07:00
Annika
111f1383a9
Modlog: Add weekroomban as a punishment 2020-10-18 12:04:11 -07:00
Annika
fc0a16d3cb
Modlog: Fix regex in Modlog#getGlobalPunishments 2020-10-09 18:18:58 -07:00
Annika
f4dee3c7f9
Modlog: Fix bug with punishments with no reasons
Fixes https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/page-32#post-8613159.
2020-10-03 15:25:33 -07:00
Annika
aeaa05bd5a Modlog: Minor fixes
yes another modlog commit from me!
this time, it's making sure that note searches based on user IDs actually get toID() called on them, and fixing some HTML escaping issues
2020-10-02 20:59:42 -07:00
Annika
0cf43e7461
Modlog: Default to searching all fields (#7449) 2020-10-01 09:36:36 -07:00
Annika
212b35b2fa
Modlog: Support exact user searches (#7443) 2020-09-30 11:22:49 -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
f2ef093493
Modlog: Parse entries in the child process (#7435) 2020-09-28 12:04:06 -07:00
Annika
f1b4e3d43a
Modlog: Refactor to use ModlogEntry objects (#7403) 2020-09-28 11:06:30 -07:00
Guangcong Luo
9fe45238f5
Introduce chunk readers for ReadStream (#7215)
This adds new functions `stream.byChunk(bytes)`, `stream.byLine()` etc
which parse a `ReadStream` into an `ObjectReadStream<string>` which
can then be consumed with for-await.

Fixes #7195
2020-09-27 08:55:59 -07:00
Annika
e47abc6d57
Modlog: Fix crash in renaming temporary rooms 2020-09-12 17:11:50 -07:00
Guangcong Luo
e543cb843f Revert "Improve privacy for hidden battles (#7281)"
It wasn't implemented in `user.games` and a few other places, leading to bugs.

This reverts commit 222d2e1ac9.
2020-09-06 22:15:55 -04:00
Annika
222d2e1ac9
Improve privacy for hidden battles (#7281)
Co-authored-by: Kirk Scheibelhut <kjs@google.com>
2020-09-06 18:46:35 -07:00
Mia
8f8e197d9c
Helptickets: Stop modlogging to Help room (#7070) 2020-09-05 18:25:20 -07:00
Annika
4cbf905ec8
Modlog: Fix exact searches and improve hotpatching (#7211) 2020-08-15 14:10:46 -07:00
Annika
0ce6613219
Fix modlog crash (#7200) 2020-08-13 17:07:57 -07:00
Annika
fc99159589
Punishments: Make autolocks last a week on users with bad records (#7074) 2020-08-12 12:06:45 -07:00
Annika
f563252418
Modlog: Fix bugs and support hotpatching (#7163) 2020-08-06 22:05:13 -04:00
Annika
f34ffa9e74
Refactor Modlog into one file (#7127) 2020-08-06 00:39:37 -07:00