Commit Graph

133 Commits

Author SHA1 Message Date
Mia
cfeb1303bb
Chat: Properly typecheck Chat.runHandlers arguments (#8612) 2022-01-23 17:55:19 -08:00
Guangcong Luo
8642abcd12
Avatar manager (#8563) 2021-12-14 10:21:02 -08:00
Guangcong Luo
be0cee5a33
Refactor getIdentity not to take roomids (#8528) 2021-11-12 22:05:59 -08:00
Annika
9c08822cff Revert Multi Battle changes 2021-10-24 17:13:10 -04:00
Mia
88ef7fdf1f
Support marksharing ranges (#8498) 2021-10-24 12:44:46 -07:00
Mia
0f5c9c133b
Support searching multi formats (#8172) 2021-10-24 12:04:57 -07:00
Mia
83e77f9c93 Friends: Write last seen data on disconnect 2021-07-28 14:08:40 -05:00
Mia
f3856757a1
Users: default the display of friend login notifs to off 2021-07-23 22:29:06 -05:00
Mia
bdeb9c538a Support /blockchallenges friends 2021-07-22 21:18:52 -05:00
Mia
ed34cc49b1 Friends: Add a page to spectate the battles of friends 2021-07-19 02:57:08 -05:00
Mia
20c795f8f4
Friends: Move caching to User#friends (#8404) 2021-07-16 20:33:07 -07:00
Mia
e5fbd64427
Support adding friends (#7333) 2021-07-16 12:56:34 -07:00
Annika
6ed55b6d1f
IPTools: Add sanity checks (#8331) 2021-07-09 19:59:45 -07:00
Distrib
e9a5bc9332
/blockchallenges: Support allowing challenges from certain groups (#8362) 2021-06-26 17:28:03 -07:00
Mia
94b5e5e898 Fix trusting users 2021-06-01 10:17:10 -05:00
Mia
8fa02b73a4 Users: Automatically trust users in Staff room 2021-06-01 08:33:51 -05:00
Mia
09e298f15b
Punishments: Support giving multiple punishments to one user (#8265) 2021-05-31 11:06:01 -07:00
Guangcong Luo
74211859c9 Update to TypeScript 4.3
Changes relevant to our codebase:

- TypeScript now knows that `typeof id === 'string'`! A bunch of casts
  on `User | ID` or `Room | RoomID` are no longer necessary!!!

- `override` will protect against certain typoes, and we'll adopt it
  (and `--noImplicitOverride`) as soon as sucrase comes in

- `declare` is now required for properties we want to narrow the type
  of without directly overwriting - a good thing to use going forward,
	but very annoying to fix all our old code for
2021-05-26 14:16:54 -07:00
Mia
77023b02b6
Stop defaulting messages to Lobby in protocol (#8304) 2021-05-17 07:17:48 -07:00
Guangcong Luo
c695620e58
Refactor to new challenge system (#8303)
See PR for full details:

https://github.com/smogon/pokemon-showdown/pull/8303
2021-05-17 07:15:01 -07:00
Mia
d99a21ad41 Users: Close open pages on connection disconnect 2021-05-14 09:33:01 -05:00
Mia
7154920b2c
Support forcing modchat on ladder tour battles (#8214) 2021-04-23 22:40:09 -07:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -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
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -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
6b4507aba9
Chat: Track slow async commands (#7961) 2021-01-29 08:59:20 -08:00
Guangcong Luo
1fc92ef977 Fix bugs in inRooms/games refactor 2021-01-28 20:35:30 -05:00
Mia
c1cd4630b1
Users: Automatically expire inactive connections (#7957) 2021-01-28 11:43:02 -08:00
Mia
5c9c84c415
Remove User#inRooms and User#games (#7815) 2021-01-28 10:41:35 -08:00
Mia
7095ba77c0 Fix another isStaff instance 2020-12-01 12:30:19 -06:00
Mia
b5e66f3177
Users: Properly assign isStaff to staff roomauth (#7757) 2020-12-01 09:30:39 -08:00
Annika
bae69612b0
Users: Don't give bots isStaff (#7750) 2020-11-30 12:55:46 -08:00
Mia
b0c2f03f41
Users: Apply loginfilters to namelocked users (#7662) 2020-11-08 17:26:10 -08:00
Guangcong Luo
1e39e19f00 Refactor chat to use Utils.splitFirst 2020-11-08 18:31:38 +00:00
Annika
ecd90af23b
Punishments: Make locks expire on their own (#7598) 2020-11-06 15:14:46 -08:00
Guangcong Luo
fbdda144eb
Support Config.noguestsecurity (#7625)
This Config option, intended purely for development test servers,
allows users to log in without a signed token, by using
`/trn [USERNAME]`. This allows logins without a login server.

The rest of the server has been changed to make sure unregistered
users never have any powers they shouldn't have.
2020-11-05 04:55:05 -08:00
Mia
71dbb2f466
Support Config.nothrottle (#7637) 2020-11-05 04:52:04 -08:00
Mia
56501355d7
Support ignoring room invites (#7180) 2020-11-03 10:15:17 -08:00
Annika
1d9c24c382
Users: Don't merge unregistered names across IPs
Fixes #7594
2020-10-30 08:46:52 -07:00
Annika
62f1bd14fc Chat plugins: Make viewing source respect /permissions 2020-10-28 16:59:45 -07:00
Annika
0164af53e4
Support banning users from using groupchats (#7558) 2020-10-28 14:12:42 -07:00
Mia
f1f6f21fc1
Connections: Track current chat page (#7522) 2020-10-26 14:43:16 -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
Annika
a3b83ba50b
Translations: Convert JSON to TypeScript (#7493) 2020-10-09 12:03:44 -07:00
Annika
480079e790
Punishmentfilter: Don't activate for permalocks (#7389) 2020-09-19 01:23:21 -07:00
Annika
66ba5a25b2
Remove Idle status on logging in (#7383) 2020-09-18 03:58:23 -07:00
Annika
83e8262d12
Users: Fix bug with IP handling (#7305) 2020-09-05 08:18:42 -07:00
Annika
c9fa3fc389
Refactor User#prevNames and User#ips to arrays (#7267) 2020-08-29 10:27:03 -07:00