Commit Graph

129 Commits

Author SHA1 Message Date
Mia
cfeb1303bb
Chat: Properly typecheck Chat.runHandlers arguments (#8612) 2022-01-23 17:55:19 -08:00
Mia
7037bdfff5 Chat: Add a hook for ladder searches 2022-01-04 16:15:03 -06:00
Mia
27d71e9011 Core: Make /help work on command aliases
At the moment, if you do /help alias, it returns not found (even if the base command has help).
2022-01-04 09:29:31 -06:00
Guangcong Luo
8642abcd12
Avatar manager (#8563) 2021-12-14 10:21:02 -08:00
Mia
72abb6a0f2 /help: Move /report to the front of the commands list
Requested to make it more visible.
2021-12-13 21:43:34 -06:00
Guangcong Luo
be0cee5a33
Refactor getIdentity not to take roomids (#8528) 2021-11-12 22:05:59 -08:00
Mia
182ed60221 CRQ: Default to undefined on some userdetails data to save bandwidth
Per https://github.com/smogon/pokemon-showdown/pull/8512/files#r743947584
2021-11-05 16:38:10 -05:00
singiamtel
a7cdf95c5a
CRQ: Don't send your own friend status in userdetails 2021-11-02 12:05:20 -05:00
Annika
9c08822cff Revert Multi Battle changes 2021-10-24 17:13:10 -04:00
Mia
0f5c9c133b
Support searching multi formats (#8172) 2021-10-24 12:04:57 -07:00
Mia
a7d27dde3a Add help for all commands in server/chat-commands/ 2021-09-23 12:11:55 -05:00
Mia
24e1dcbe24 Ladders: Add timestamps to challenge notifications 2021-09-19 14:13:36 -05:00
PartMan
35a917d418
/help: Trim commands (#8461)
```
[09:45:39] @PartMan: !h status
Could not find help for '/status ' - displaying help for '/status' instead
/status [note] - Sets a short note as your status, visible when users click your username.
Use /clearstatus to clear your status message.
```
2021-09-18 15:54:42 -07:00
Kris Johnson
fff385b42f /hiderank: Fix typo 2021-09-08 17:42:41 -06:00
Kris Johnson
e1e7296b2e /hiderank: Let higher rank SLs hiderank as SLs 2021-09-08 16:24:32 -06:00
Mia
23e4c8f534 Chat: Properly privatize the /help of private commands
This ensures only users who can use said private commands can view the help (and it's no longer a catch-all 'lock' perm)
2021-08-13 12:17:48 -05:00
Mia
bdeb9c538a Support /blockchallenges friends 2021-07-22 21:18:52 -05:00
Mia
a0b1fa1cc5 /crq: Inform the client if the user is friended
Necessary for upcoming changes.
2021-07-22 14:56:27 -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
TheSupervillain
1ef25735b9
Avatars: Change Duel Disk to Wonder Launcher (#8380) 2021-07-07 21:58:24 -07:00
Guangcong Luo
a3eec79627 Update documentation for /avatarhelp 2021-07-04 17:05:01 -05:00
Mia
5430bf4365 Fix build
Unsure why ESLint did not throw this for me.
2021-06-28 21:50:56 -05:00
Mia
d829ceeff4 Chat: Validate command recursion 2021-06-28 21:28:30 -05:00
Distrib
e9a5bc9332
/blockchallenges: Support allowing challenges from certain groups (#8362) 2021-06-26 17:28:03 -07:00
Guangcong Luo
a338dad78a Fix challenge notifications
This is a temporary fix; the real fix is a decent margin more
complicated, unfortunately...
2021-05-31 20:05:47 -04: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
Guangcong Luo
49cacba6cf Support !rebroadcast to bypass broadcast cooldown
The old system where only admins can bypass the broadcast cooldown
is weird, because it's wrong in both directions: Admins could
unintentionally re-broadcast, but other users couldn't intentionally
re-broadcast.

Now no one can unintentionally re-broadcast and everyone can
intentionally re-broadcast.
2021-05-23 19:41:07 -07:00
Marty-D
abec21011f
Add more missing Trainer avatars 2021-05-22 13:47:23 -04:00
Annika
5b50c31507 /blockpms: Normalize capitalization 2021-05-19 18:07:26 -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
0466718637 Increase status character limit to 52
Policy end, Ransei said this was fine. Tech end, looks fine - two lines on the usercard, even with caps it's pretty minimal.
2021-05-11 12:07:15 -05:00
Kris Johnson
5331e0e748
Refactor splitTarget to splitUser (#8246) 2021-05-01 00:42:25 -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
Mia
721e7bc8a2 Remove /makegroupchat from /commands
Regs can't use it now, so it doesn't need to be here
2021-04-29 09:48:11 -05:00
Guangcong Luo
d9c564d15c Add hint for locked users challenging unlocked 2021-04-27 22:34:52 -07:00
Mia
ea6f6a81d9
Chat: Allow plugins to add custom /crq handlers (#8225) 2021-04-25 15:26:05 -07:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Kris Johnson
46b9a36fa7 /hiderank: Don't let users hide as Section Leaders 2021-04-25 02:26:46 -06:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -07:00
Guangcong Luo
13189fdb02
Update Dex API (#8181)
This is the change that renames:

- `Dex.getMove` -> `Dex.moves.get`
- `Dex.getAbility` -> `Dex.abilities.get`
- `Dex.getItem` -> `Dex.items.get`
- `Dex.getSpecies` -> `Dex.species.get`
- `Dex.getEffect` -> `Dex.conditions.get`
- `Dex.getNature` -> `Dex.natures.get`
- `Dex.getType` -> `Dex.types.get`
- `Dex.getFormat` -> `Dex.formats.get`

In addition, some other APIs have been updated:

- `getByID` methods have also been added to every other table.
- `Dex.moves.all()` now gets an array of all moves
  - Plus equivalent methods for `abilities`, `items`, `species`, `formats`, `natures`, `types`
  - Note: there's no `Dex.conditions.all()`
- new API: `Dex.stats` for naming/iterating stats
- `Dex.getEffectByID` -> `Dex.conditions.getByID`
- `Dex.getType` -> `Dex.types.get`
- `Dex.data.Formats` -> `Dex.data.Rulesets`
- `Dex.formats` -> now an array `Dex.formats.all()`
- `Dex.getRuleTable` -> `Dex.formats.getRuleTable`
- `Dex.validateFormat` -> `Dex.formats.validate`

Team functions have been split off into a new `sim/teams` package:

- `Dex.packTeam` -> `Teams.pack`
- `Dex.fastUnpackTeam` -> `Teams.unpack`
- `Dex.generateTeam` -> `Teams.generate`
- `Dex.stringifyTeam` -> `Teams.export`

`Teams.export` has also been rewritten to better match how it works in client.

This implements #8178
2021-04-08 03:00:37 -07:00
Mia
783d581908 /invitebattle: Update form if target is blocking challenges 2021-04-04 14:19:55 -05:00
Mia
07bd07af4d Core: Properly apply /bch to /invitebattle 2021-04-03 21:26:43 -05:00
Guangcong Luo
47da1d61c8 Use the invite form for /importinputlog 2021-04-02 23:00:30 -07:00
Guangcong Luo
694e79eea8 Add form for inviting players
(This makes it so you don't need to use console commands)
2021-04-02 23:00:30 -07:00
Guangcong Luo
8f001cc2ae Support challenges in 4-player games 2021-04-02 23:00:30 -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
Mia
2c5906cedb Support more roomids with - in /msgroom 2021-02-28 10:02:33 -06:00
HoeenHero
749c40b6d9 Support groupchats in /msgroom 2021-02-28 09:54:23 -05:00
Annika
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00