Commit Graph

154 Commits

Author SHA1 Message Date
Guangcong Luo
eb60769cd3
Refactor learnset checking (#9951)
After seeing fifty different ways we use `getLearnset`, most of which
are just "haphazardly assemble a movepool", I decided to write
`getFullLearnset` and `getMovePool`, which centralizes the
implementations and prevents weird bugs like 9713dc6db5 which
we spent two years trying to figure out.
2023-12-08 22:45:47 -06:00
Leonard Craft III
947e783cce
Don't highlight on updateclient/loginserver commands (#9906) 2023-11-15 21:00:45 -06:00
Leonard Craft III
658af82b89
Add command to view remaining battles during lockdown (#9872)
* Add command to view remaining battles during lockdown

* Use details tag if more than 10 battles
2023-11-12 22:51:16 -06:00
Mia
0211066723
Add offline messaging (#8440) 2023-11-04 14:45:18 -05:00
Mia
25eff0eb0d Admin: Make Teams hotpatchable 2023-10-08 22:24:38 -05:00
Mia
5b82f0a6ed Admin: Add a command to rebuild the client 2023-04-13 22:21:50 -05:00
Mia
527a4b8b97
Add a command to restart the loginserver (#8513) 2023-03-14 12:03:43 -05:00
Mia
0ad7b114ec Chat: Ensure child processes are unspawned on hotpatch 2022-12-23 13:16:21 -06:00
Mia
b11177d530
Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00
Mia
5c73b3632a Admin: Add a command to disable ripgrep
Requested (and okayed) by Marty as a stopgap. Ripgrep lags usage stats all to hell.
2022-12-01 17:38:21 -06:00
Mia
a026935e33 Admin: Add a command to change namecolors
Server-side for https://github.com/smogon/pokemon-showdown-client/pull/2034
2022-12-01 08:52:13 -06:00
Mia
ec4cb6a6fa
Support persisting battles in a Postgres database (#8442) 2022-07-22 18:07:10 -07:00
Mia
2834e06085
Admin: Limit the size of pageids sent in /j view-bot 2022-05-11 10:23:59 -05:00
Mia
94cc6115cd Admin: Clarify index.ts process display in /processes 2022-05-03 14:32:12 -05:00
Hisuian Zoroark
fe683a8510
Editbattle: Fix HP editing (#8646) 2022-02-07 16:01:02 -07:00
Mia
8d9cbebb5f
Fix /ebat number parsing
https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/page-69#post-9074782.
Running toID() on negative numbers stripped out the negative.
2022-01-11 14:50:27 -06:00
Mia
6429937906 Admin: Make /bash broadcastable
Convenience.
2022-01-04 14:30:20 -06:00
Annika
b3839dec66 /evalsql: Properly log to <<upperstaff>>
Previously it just logged `[object Object]`.
2021-12-10 19:21:15 -08:00
Mia
f608496938
Support JSX in HTML pages (#8523)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-11-12 22:06:26 -08:00
Mia
a7d27dde3a Add help for all commands in server/chat-commands/ 2021-09-23 12:11:55 -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
3ece2f9eef /evalsql: Fix error handling 2021-08-22 19:47:20 -05:00
Mia
8cf1035ee2
SQL: Automatically prepare statements unless told otherwise (#8439) 2021-08-18 12:51:39 -07:00
Mia
77861ceae6
SQL: Use a QueryProcessManager subclass (#8422) 2021-08-14 17:45:51 -07:00
Annika
633e061067 Modlog: Remove text logging code 2021-08-09 14:06:14 -07:00
Annika
982c357f88 /evalsql: Fix bug 2021-07-23 15:27:10 -07:00
Annika
bcbe100c41
Modlog: Use SQLite for searches (#8004) 2021-07-23 13:47:49 -07:00
Annika
19c6daf9f2 /evalsql: Make table scroll horizontally 2021-07-21 14:34:25 -07:00
Mia
879bb9dc18 /evalsql: Destroy DB after use 2021-07-21 15:06:14 -05:00
Mia
9ed2c0036f
Add a command for evaluating SQLite (#8407) 2021-07-21 13:05:02 -07:00
Mia
e5fbd64427
Support adding friends (#7333) 2021-07-16 12:56:34 -07:00
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Mia
7fe886302c /botmsg: Fix filter check 2021-06-29 00:45:29 -05:00
Mia
d829ceeff4 Chat: Validate command recursion 2021-06-28 21:28:30 -05:00
PartMan
0d7159b12c
/botmsg: Permit ROs too (#8370)
(Bots become ROs of subroom groupchats if they create them.)
2021-06-22 15:52:54 -07:00
Mia
66261e99d2
Admin: Support /eval in PMs (#8249) 2021-05-25 16:28:09 -07:00
Quinton Lee
3783f11ea0
Implement /sendprivatehtmlbox (#8285) 2021-05-14 02:47:33 -07:00
Mia
ec1c8cc95d /botmsg: Bypass room throttles 2021-05-09 18:05:25 -05:00
HoeenHero
36fe51f71c Dont block future updates if Config.privatecodepath is not set. 2021-05-08 20:55:49 -04:00
Guangcong Luo
11a6902154 Force rebuild when using /rebuild 2021-05-06 01:36:34 -07:00
Mia
abcf367181 Admin: Respawn Dexsearch processes in formats hotpatch 2021-05-03 11:41:49 -05:00
Quinton Lee
51e005e65d
Implement /closehtmlpage (#8253) 2021-05-02 13:42:46 -07:00
Guangcong Luo
a480a84ce4 Chat API: Add requireUser
This simplifies a lot of `splitUser` uses that immediately go on
to make sure the user actually exists.
2021-04-30 17:14:35 -07:00
Guangcong Luo
0230a002fd Make bot attribution stricter
Admins should not be using `addhtml` commands for jokes. This makes
it so only gbots get access to unattributed `addhtml`.
2021-04-30 17:14:35 -07:00
Guangcong Luo
d80319d114
Implement /botmsg (#8240) 2021-04-29 00:54:57 -07:00
Quinton Lee
6079927a95
Commands: Support sending |selectorhtml| to bot HTML pages (#8228) 2021-04-25 20:20:57 -07: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
Annika
c87f63f4f0 /processes: Fix RAM usage display
`ps` reports RSS in kb, not bytes, making /processes off by a factor of 1024
2021-04-17 22:17:48 -07:00