Commit Graph

1150 Commits

Author SHA1 Message Date
Guangcong Luo
8132ab5981 Use PM.isParentProcess to detect parent/child process 2018-01-18 04:24:49 -06:00
Guangcong Luo
6ae6a8daf2 Remove debug code 2018-01-18 03:45:41 -06:00
Guangcong Luo
094d6ed677 Improve /report
Closes #4351
2018-01-18 03:40:32 -06:00
Guangcong Luo
ab1f995daa Rewrite Process Manager
Process Manager is now lib/process-manager.js

It's been entirely rewritten to reflect what I think a process manager
API should look like.

In particular, there are now two Process Managers, QueryProcessManager
and StreamProcessManager.

Pass QueryProcessManager a pure-ish query function (sync or async) that
takes a JSON value and returns a JSON value, and PM.query() will
execute that function in a subprocess, and return a Promise for its
return value.

StreamProcessManager is the same idea: Pass it a function to create an
ObjectReadWriteStream, and PM.createStream() will create a stream in a
subprocess and return a stream connected to it.
2018-01-18 03:34:16 -06:00
Guangcong Luo
8f3bed7e59 Make fsPath.read() return a string by default
This is an update to match how Streams work: .read() returns a string,
and .readBuffer() returns a Buffer.

Being able to statically predict what type .read() will return is
really useful to TypeScript, in addition to being generally useful for
readability.

As a side benefit, readTextIfExists() is renamed readIfExists().
2018-01-18 03:31:13 -06:00
urkerab
297af3b111 Allow formats to override checkLearnset (#4341) 2018-01-16 04:16:48 -06:00
Charlie Kobayashi
0df8118366 Update helptickets.js (#4317) 2018-01-09 13:18:23 -06:00
Charlie Kobayashi
5156af6b66 Help: Recreated tickets should have ticketban button (#4318) 2018-01-09 13:17:19 -06:00
Charlie Kobayashi
8706d257f2 Scavengers: change official time colours (#4323) 2018-01-09 13:16:16 -06:00
Bär Halberkamp
ac0ea3a91b Wifi: better modlog labeling 2018-01-09 17:27:27 +01:00
Charlie Kobayashi
331af4e794 Refactor Modlog Formatting (#3972) 2018-01-08 15:18:24 -06:00
urkerab
ff3ecccab0 Restricted makes more sense than banned in some cases (#4311) 2018-01-06 11:37:47 +08:00
Jeremy Piemonte
7ba4eb62d1 Datasearch: Consistently capitalize Gen in UI (#4309) 2018-01-05 10:05:33 -06:00
Kris Johnson
b197bc59e2 Check for Arceus and Silvally formes in /mnm (#4295) 2018-01-02 22:58:18 +08:00
Bär Halberkamp
1403128056 Wifi: Fix modlog entries for GTS giveaways 2017-12-31 00:29:56 +01:00
Bär Halberkamp
ebe418ba93 Hangman: Fix a mistake caused by the for...of refactor
To anyone else doing these refactors, for...of loops do NOT allow you to edit the element in place
2017-12-30 23:28:13 +01:00
Bär Halberkamp
e1c496915f Wifi: pretty much revert my last commit because I didn't use my brain 2017-12-30 00:59:48 +01:00
Bär Halberkamp
b269305742 Wifi: fix modlog entries for giveaways 2017-12-29 01:02:50 +01:00
Marty-D
4f5427eb95
Fix "irregular whitespace" in previous commit 2017-12-28 16:23:32 -05:00
Caleb Young
205cf11901 Fix for...of bug in /learn command (#4290) 2017-12-28 16:07:41 -05:00
Guangcong Luo
cb1e1133be Fix bugs from for-of refactor 2017-12-28 12:28:40 -05:00
Kris Johnson
a6ce5c9dc1 Refactor chat-plugins and formats to for...of (#4288) 2017-12-28 05:22:28 -06:00
Jeremy Piemonte
e0c08eafba Standardize help commands (#4285) 2017-12-27 19:35:32 -06:00
whales
4d90b27e64 Roomsettings: Add support for modjoin/chat ac and trusted (#4283) 2017-12-27 10:05:20 -06:00
Guangcong Luo
1ab8d2ed31 Redesign Help ticket form 2017-12-26 00:26:56 -06:00
Guangcong Luo
417a2aad51 Fix spacing for Ticketban button 2017-12-26 00:25:10 -06:00
Guangcong Luo
0053e88683 Help tickets: Refer password resets to adminrequests 2017-12-25 01:19:47 -05:00
Kris Johnson
4393b36914 /mnm: Remove redundant parts of warning messages (#4220) 2017-12-24 16:45:07 -05:00
Guangcong Luo
24da0d3bd3 Add Ticketban button 2017-12-23 23:28:00 -06:00
Guangcong Luo
322cfaae73 Notify Staff better for Help tickets 2017-12-23 05:00:11 -05:00
Kris Johnson
3ac1f17195 MnM: Ban Gengarite and Shadow Tag (#4273) 2017-12-22 13:02:39 +08:00
Guangcong Luo
176264d39f Improve Help ticket Staff-notification design 2017-12-21 05:54:26 -06:00
Guangcong Luo
3d85291ade Don't modlog routine Help ticket changes 2017-12-21 05:54:26 -06:00
Guangcong Luo
0bbda418bf Rename tickets.js -> helptickets.js 2017-12-20 21:19:09 -06:00
Guangcong Luo
87baef3230 Use less code duplication in Help Tickets 2017-12-20 21:18:48 -06:00
HoeenHero
b1d0cb3361 Tickets: Bug fixes and improve form (#4270) 2017-12-20 21:00:21 -06:00
Guangcong Luo
a5b49cd9c1 Help tickets: Prevent inconsistent state hotpatch crash 2017-12-20 20:57:36 -05:00
whales
cd9a39c5fe Tickets: Fix crash on escalation (#4268)
Tickets would store the user object of the staff that escalated it, which crashes when it tries to stringify it.
2017-12-20 16:17:00 -06:00
CheeseMuffin
510c6940b7 Fix generation params in /weak (#4269) 2017-12-20 16:16:08 -06:00
Guangcong Luo
c21586d87f Fix Help Tickets expire timer 2017-12-19 23:20:59 -05:00
HoeenHero
227f7b4741 Modlog: Fix search all rooms (#4266) 2017-12-19 15:13:56 -06:00
HoeenHero
44ec13b79d Tickets: Fix expriation (#4265) 2017-12-19 15:12:42 -06:00
Guangcong Luo
0d43204487 Change room log API
Interaction with room logs is changing to be more straightforward. This
is the first step of the change, which changes rooms.js.

- Rename: logEntry -> roomlog
- Rename: sendModCommand -> sendMods
- Rename: addLogMessage -> addByUser
- New function: sendModsByUser

The long-term plan is documented in:

https://github.com/Zarel/Pokemon-Showdown/pull/3972#issuecomment-352226219
2017-12-18 22:51:21 -06:00
Teremiare
c8fadb61c9 Dexsearch: don't show nfe pokemon as lc (#4262) 2017-12-18 15:33:06 -06:00
Quinton Lee
12d10c80d5
Fix !checkchallenges 2017-12-16 18:34:28 -06:00
Guangcong Luo
193e948592 Move crashlogger.js -> lib/crashlogger.js 2017-12-16 15:40:45 -06:00
Guangcong Luo
738c60ed8b Move repl.js -> lib/repl.js 2017-12-16 15:40:45 -06:00
Guangcong Luo
a9540917f5 Move fs.js -> lib/fs.js 2017-12-16 15:40:45 -06:00
Jeremy Piemonte
965b7f618b Help Tickets: Remove redundant |html| (#4252) 2017-12-14 14:11:57 -06:00
Guangcong Luo
c63e57f2e9 Defer joining restricted HTML rooms until login
This makes it so staff-only HTML rooms can defer rendering until the
user has logged in.

This also introduces a new constant `Rooms.RETRY_AFTER_LOGIN` which
makes it clearer what returning `null` means in context.
2017-12-13 23:33:33 -06:00