Commit Graph

80 Commits

Author SHA1 Message Date
Mia
6c19c06c44 Chatlog: Fix /help searchlogs 2021-07-26 11:39:43 -05:00
Mia
293c65303d /searchlog: Escape HTML in search 2021-07-21 13:59:44 -05:00
Mia
ba2a109311
Support viewing stats on the activity of rooms (#8345) 2021-07-09 20:01:15 -07:00
Mia
9000eebbef Chatlog: Fix date validation 2021-05-30 01:43:17 -05:00
Mia
487fc5e3fa Fix comment 2021-05-29 21:02:16 -05:00
Mia
8ba56d3d03 Chatlog: Fix crash in date validation 2021-05-29 20:56:07 -05:00
Mia
38374f8bd9 Alias /chatlog to /chatlogs 2021-05-16 19:53:33 -05:00
Mia
a7c0f8054a Chatlog: Fix crash
This should ensure that all dates passed to roomstats are in the form year-month. The crashes came from only a year being passed
2021-05-08 11:29:18 -05:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Guangcong Luo
0e0389bdc8 Rename pageContext.send to pageContext.setHTML
It's currently not very similar to commandContext.send so using the
same name could make things very confusing.

We have a new `pageContext.send` function that actually behaves as
you'd expect.
2021-04-25 13:25:42 -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
Mia
4f31d369f5 Add an easy way to disable battlesearching commands 2021-03-25 12:24:12 -05:00
Mia
ea3bd8303f
Roomstats: Display total stats and handle empty logfiles better (#8117) 2021-03-15 07:54:21 -07:00
Mia
736e38e4af
ProcessManager: Handle Monitor#slow in subprocesses (#7990) 2021-03-03 12:39:53 -08:00
Mia
d50f5823ae Searchlogs: Properly handle deleted rooms 2021-02-26 13:52:25 -06:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Mia
f4d78b8395
Fix build 2021-01-30 15:08:50 -06: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
0ad5c41896 Chatlog: Restrict access to slowlog roomlogs 2021-01-30 14:40:15 -06:00
Mia
5c9c84c415
Remove User#inRooms and User#games (#7815) 2021-01-28 10:41:35 -08:00
Mia
121e93524c
Add a command for searching groupchats (#7900)
* Add a command for searching groupchats

* OK
2021-01-11 01:27:59 -08:00
Mia
755f930957
Add a page/command for viewing log access logs (#7794) 2020-12-14 01:38:56 -08:00
Mia
94fe9d838b
Fix userid search regexes for battlesearch/chatlog (#7801) 2020-12-13 23:12:14 -08:00
Mia
ceb7bfab8b
Battlelog: Run search in PM (#7796) 2020-12-12 13:44:54 -08:00
Annika
37daf55014
Chatlog: Increase PM timeout to 1 hour 2020-12-11 20:47:09 -08:00
Mia
f9c4f8d4bc
Chatlog: Refactor FS/ripgrep handling and support battle logs (#7775) 2020-12-11 16:51:42 -08:00
Annika
da83a9bc37 Chatlog: Keep Upper Staff logs secret 2020-11-27 11:24:02 -08:00
Annika
7b9903bc8e
Chatlog: Support room aliases in /linecount (#7652) 2020-11-23 15:12:36 +04:00
Mia
0246147e94
Chatlog: Refactor perm checks for gstaff (#7649) 2020-11-11 19:54:17 -08:00
Guangcong Luo
b9a0d3f494 Fix return signature of context.parse 2020-11-11 03:25:06 +00:00
Mia
2cf1562541
Chatlog: Properly format search regexes in result rendering (#7674) 2020-11-10 14:25:12 -08:00
Konrad Borowski
7bcdf130bd
Chatlog: Escape regex when searching for an user (#7656) 2020-11-07 18:19:38 -08:00
Mia
950c74360b
Chatlog: Handle next result buttons properly (#7658) 2020-11-07 14:58:53 -08:00
Konrad Borowski
119b98b593
Chatlog: Automatically determine regex engine (#7657)
This makes ripgrep use PCRE2 for searching logs only when necessary.
2020-11-07 14:32:44 -08:00
Mia
8a1919fd0a Chatlog: Update arg handling 2020-11-04 14:24:53 -06:00
Mia
065be6ca78
Topusers: Fix arg handling (#7635) 2020-11-04 23:14:40 +04:00
Mia
89d127eafd
ProcessManager: Add a static execFile (#7566) 2020-11-02 11:35:07 -08:00
Mia
e2cb3a1f57
Chatlog: Support searching for a user (#7591) 2020-11-02 08:50:58 -08:00
Mia
458b47cb39
Chatlog: Allow non-trusted secret room ROs to view logs (#7597) 2020-10-29 06:48:55 -07:00
Mia
c67b745d44
Chatlog: Carry opts over when switching days (#7584) 2020-10-28 16:50:57 -07:00
Mia
2e864524e0
Chatlog: Use new username html tag (#7519) 2020-10-27 08:10:28 -07: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
5b387aed47
Chatlog: Support viewing log stats for a room (#7514) 2020-10-20 05:52:45 -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
Mia
a975f623a4
Chatlog: Add more opts (#7479) 2020-10-06 15:21:57 -07:00
Mia
fe5ef07f0c
Chatlog: Notify the user that a search is running (#7474) 2020-10-05 13:55:28 -07:00
Mia
ab16b48d48
Chatlog: Update permission checks (#7459) 2020-10-02 19:26:29 -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
Mia
b7630b70cf
Chatlog: Handle ErrorMessage properly (#7438) 2020-09-29 14:30:50 -07:00