Commit Graph

658 Commits

Author SHA1 Message Date
fart
73f58e0855
Increase autojoin limit to 15 (#6728)
Per https://www.smogon.com/forums/threads/increase-chatroom-autojoin-limit.3657450
2020-05-24 18:43:53 -07:00
PartMan
c3def9cdff
Fix Effectiveness showing undefined (#6733)
(change .species => .name)
2020-05-23 12:18:40 -07:00
Guangcong Luo
7c979807fa Rename /rename to /renameroom
I didn't notice that this command was named `/rename` and not
`/renameroom`. The problem was that `/rename` looks like it renames
users (like a non-forced version of `/forcerename`), and all other
room commands with this ambiguity do have `room` in them, like
`/deleteroom`, for this exact reason.
2020-05-22 13:31:57 -07:00
Volco
0dee619326
Fix the rename command to log the new room & require a target (#6710) 2020-05-18 09:21:14 -07:00
AnnikaCodes
e7d72ba4e8
Add more information to /faq autoconfirmed (#6696) 2020-05-17 07:35:27 -07:00
Guangcong Luo
78a29656ac Fix /data defaulting to numbers instead of tiers
Fixes #6700
2020-05-16 10:58:31 -04:00
Guangcong Luo
1d6d8f73da Refactor HTML validator
Mostly, extraneous `<` tags are now correctly detected, with a better tag tokenizer.
I also removed the separate passes for <img> and <button> validation.

Fixes #6685

Thanks PartMan for contributing some ideas.
2020-05-16 10:51:45 -04:00
Konrad Borowski
c687b3b0ed
Replace attributed uhtml on change (#6693)
Not doing so wastes a lot of bandwidth.

This fixes https://www.smogon.com/forums/threads/dont-send-all-uhtml-messages.3664370/

`|uhtmlchange|` is no longer automatically parsed; please use
`room.uhtmlchange(` instead.
2020-05-16 07:16:42 -07:00
Kris Johnson
59f2a59fbc
Fix /roomtierdisplay permissions (#6699) 2020-05-16 00:03:18 -07:00
Kris Johnson
2a642afac9
Support changing /data's tier in /roomsettings (#6675) 2020-05-15 18:55:09 -07:00
HoeenHero
a1916a2919 Fix /statcalc 2020-05-14 17:11:17 -04:00
AnnikaCodes
ca45d16cd2
Update links in /intro for Gen 8 (#6678) 2020-05-14 20:00:55 +04:00
Kirk Scheibelhut
6e2b475dac Change property checks to TypeScript 3.9 2020-05-12 20:11:56 -07:00
Mia
7bd0ce8dc7
Require forcing for bans and blacklists on trusted users (#6680) 2020-05-12 02:02:53 -07:00
Kris Johnson
d20f1fbb64
Typescript info (#6670) 2020-05-11 03:08:33 -07:00
Leonard Craft III
f7c46b7f33
Allow leaders+ to exportinputlog directly (#6668) 2020-05-08 23:46:25 -07:00
Kirk Scheibelhut
2af7040270
Group zMove and maxMove attributes (#6652)
This mostly serves to provide cleaner and more consistent field
naming. maxMove currently doesn't have boosts or effects to group
together but who knows what will be thrown at us via DLC, and being
symmetrical with zMoves is a nice.
2020-05-04 20:21:27 -07:00
Leonard Craft III
5dce0ef1a1
Update /bugs with new bug reports thread (#6653) 2020-05-04 19:35:15 -07:00
Nol
7ae54deaf7
Add bl as an alias for blacklist (#6646) 2020-05-02 18:05:08 -07:00
Waleed Hassan
a29c62e71c
Fix hotpatching chat (#6643) 2020-05-02 12:32:16 -07:00
Kris Johnson
979be98574
Refactor inheritsFrom to changesFrom (#6611) 2020-04-26 14:44:25 -07:00
Austin Couturier
2ea1e00ef2
Mention TypeScript in /git (#6617) 2020-04-26 10:53:16 -07:00
AnnikaCodes
65fe886111
Don't broadcast errors in !formathelp (#6616) 2020-04-25 14:05:15 -07:00
Guangcong Luo
1dada44a2a Support server/chat-plugins/private as symlink 2020-04-25 15:51:11 -04:00
Guangcong Luo
6a685df8c7 Fix crashes when hotpatching chat
(Also fix a mistaken thing-of-the-day refactor: I blame giving two
different variables the same name.)
2020-04-25 11:11:24 -04:00
Astrid Halberkamp
008ff20dd8 Use better chatfilter handling in /makegroupchat 2020-04-25 17:06:39 +02:00
Guangcong Luo
31a81a91a2 Fix @type in .ts files
Some JSDoc type assertions failed to get converted during various .ts
refactors. This commit takes care of them.
2020-04-24 14:19:08 -07:00
Guangcong Luo
f6f4467265 Turn on prefer-const for .js files
Not having prefer-const on the JS side makes JS -> TS refactors really
unreadable. This commit just auto-fixes it so we're using
`prefer-const` everywhere.
2020-04-23 11:37:47 -07:00
AnnikaCodes
2c08cde63a
Add G-Max Move to /details results (#6599) 2020-04-22 01:38:37 -07:00
Guangcong Luo
776ccf9796
Refactor Sockets to ProcessManager+TypeScript (#6584) 2020-04-17 04:05:45 -07:00
Guangcong Luo
c49343b7e2 Setting a room rank can no longer demote globals
Previously, if you gave e.g. roomvoice to a global moderator, that
would demote their room rank to voice. Now, they will remain a
moderator, with "voice" only appearing in `/roomauth` and `/auth`.

(Includes a refactor of Config.groups)
2020-04-17 03:32:11 -07:00
AnnikaCodes
e626299c39
Add /faq tournaments (#6500) 2020-04-12 23:05:26 -07:00
whales
cf910afaac Fix bug in roombanning 2020-04-10 13:41:03 +09:30
Marty-D
8a29a46f25
Add more trainer avatars
made by Gnomowladny
2020-04-09 15:22:49 -04:00
Guangcong Luo
806ce433da Fix zombie processes after hotpatching chat 2020-04-08 12:02:42 -07:00
Mia
3fc757e958
Typescript chat-commands/moderation, refactor Punishments (#6490) 2020-04-08 11:56:19 -07:00
Guangcong Luo
572342c8a0 Support listing gvoices with /auth + 2020-04-07 21:47:56 -04:00
Guangcong Luo
f8cac19340 Add more Ash avatars 2020-04-07 21:47:55 -04:00
Austin Couturier
d9db072fc8
info.js: Update the /randomscalc command (#6537)
also change the link for /calc as per pre
2020-04-07 17:26:29 -07:00
The Immortal
634658a5ba Refactor unreleased Pokemon
Pokemon that are not available in-game are now consolidated into `isNonstandard`. 'Past' indicates that the Pokemon no longer works in the current generation. 'Unobtainable' indicates that the Pokemon works but can only be obtained through hacking.
2020-04-06 20:53:03 +04:00
HoeenHero
4aa40b64f0 Fix typo in 7583841d42 2020-04-03 11:24:23 -04:00
HoeenHero
7583841d42 Fix issues with /processes and /data
/processes - Accidental conversion of basename -> basespecies reverted.
/data - Fixed providing a pokedex number as an argument.
2020-04-02 23:56:14 -04:00
fart
8fda9da4d0
Fix minor /hidetext bug (#6511)
If /hidetext is used with a linecount parameter on a trusted user, it currently says "USER, 4 is a trusted user, are you sure you want to hide their messages? Use /forcehidetext if you're sure." This change hides the additional linecount parameter from the message.
2020-04-01 09:15:06 -07:00
Kris Johnson
ed9f1eb5e2
Fix /weak not showing Pokemon names (#6498) 2020-03-28 02:49:02 -07:00
Kris Johnson
994fc60aed
Rename Template to Species (#6478) 2020-03-25 23:29:27 -07:00
asgdf
34162abb8b
Add /monthlock command (#6488) 2020-03-25 03:59:47 -07:00
Guangcong Luo
0afa0d49bc Fix /invite permissions
Now that roomauth bypasses modjoin, promoting anyone to roomvoice is
sufficient to give them access to any room.
2020-03-23 23:52:16 -07:00
Mia
1628258371
Typescript chat-commands/core (#6484)
Also fix TS line numbers in GitHub Actions
2020-03-23 23:50:35 -07:00
whales
9ad7b53bdb Don't fail silently in uhtml commands 2020-03-23 20:33:42 +10:30
fart
80cfacc2b0
Support /hidetext [line count] (#6471) 2020-03-22 15:53:40 -07:00
Peach
2bf71cd42d
Attribute addhtml and code commands (#6444) 2020-03-20 20:58:56 -07:00
Kris Johnson
3e26318758
Refactor learnsets.js (#6466) 2020-03-18 00:59:29 -07:00
Guangcong Luo
60cbd7d0d7 Implement /chatlog command 2020-03-14 00:04:16 -04:00
Peach
d9f2f8e745
Block hotpatches while updating/rebuilding (#6445) 2020-03-12 00:45:14 -04:00
Guangcong Luo
64ff1da81f Refactor more things to use inheritsFrom 2020-03-10 09:59:36 -07:00
Guangcong Luo
efa98a08b9 Improve linkRegex
We're now using regexfree for linkRegex as well as the indentation
rule.

https://zarel.github.io/regexfree/
2020-03-08 20:16:53 -07:00
Guangcong Luo
4616bf1090 Fix bug in /addhtmlbox 2020-03-07 16:31:52 -08:00
asgdf
cac033ab86
Improve handling of mobile IPs with permalocks (#6338) 2020-03-07 11:50:08 -08:00
Guangcong Luo
125fe31d06 Improve eslintrc
Fixed some more code style, allowing these rules to be enabled:

- `comma-dangle`
- `function-paren-newline`
- `member-delimiter-style`
- `no-eval`
- `no-fallthrough`
- `no-misused-promises`
- `no-unused-vars`
- `operator-linebreak`
2020-03-06 22:35:55 -08:00
Waleed Hassan
8aa4f053bb
Use optional chaining and linter improvements (#6422)
This is mostly just a follow up to #6342.

`prefer-optional-chaining` was turned on and fixed in every location it
complained in. The transformed function [0] looks expensive from a
glance but from skimming through the replaced sites it doesn't appear
to be ran in any important place, so it should be OK.

The linter improvements are:
- Increase linter performance
	- Make `full-lint` and `lint` write to different caches so we
	  avoid overwriting their caches since they're different configs
	- Change husky's hook to `npm run lint` so as to write to the
	  same cache
	- Remove `@typescript-eslint/eslint-plugin-tslint` which is
	  essentially a wrapper to TSLint because the rules aren't worth
	  running another linter
- Convert `.eslintrc.json` and `.eslintrc-syntax.json` to two spaces
  rather than four tabs to respect PS' `.editorconfig`
- Rename `fulllint` to `full-lint` to ease spelling it

[0] - https://pastie.io/mmtxpf.js (prettified)
2020-03-06 11:44:32 -08:00
Guangcong Luo
b21c9047e2
Migrate to typescript-eslint (#6342) 2020-03-05 08:33:06 -08:00
whales
26fa367f75
Fix bugs with renaming rooms (#6392) 2020-02-24 23:54:10 -08:00
Ben Davies
1be30cf29a Commands: prevent /code from trimming leading horizontal whitespace 2020-02-24 01:45:17 -04:00
whales
1920ca8161 Fix lint error 2020-02-22 01:22:07 +10:30
whales
926970f765
Automatically upload replays when reporting (#6380) 2020-02-21 00:47:19 -08:00
Waleed Hassan
34e215c7a6
Support renaming rooms (#6295) 2020-02-21 00:47:07 -08:00
Mia
7d54352169
Add /shuffle command (#6372) 2020-02-18 16:45:32 -08:00
Kris Johnson
9aaab2c57b
Typescript Help Tickets and Modlog and fix warnings (#6352) 2020-02-12 21:48:03 -08:00
The Immortal
b91779476f Update /formathelp for OMs 2020-02-12 23:31:01 +04:00
Guangcong Luo
1051b9e4ba Sent a useful tip if someone sends /nick 2020-02-11 14:43:05 -08:00
whales
bf84c0bc5e Support /forcetrustuser for offline trusting (#6301) 2020-01-26 12:54:07 -08:00
Ben Davies
88ccff34ec Commands: filter guests from the userlist in /cmd roominfo's response 2020-01-20 05:45:26 -04:00
Waleed Hassan
02c862da31 Add a GroupSymbol type (#6285) 2020-01-14 14:07:11 -08:00
Kris Johnson
dde822edd3 Fix Flying Press crash in /coverage (#6275) 2020-01-11 07:31:14 +04:00
HoeenHero
584175c57c Update help information for modchat 2020-01-08 08:17:10 -05:00
asgdf
45b808b181 Fix /statcalc without pokemon argument (#6237) 2020-01-03 01:56:01 +04:00
Ocean-ey
7260db1b3d Update !code description (#6248)
!code no longer requires global voice to use in PM's.
2020-01-01 07:52:31 +04:00
whales
1f9bf5df6a Fix modchat error message 2019-12-29 10:29:09 +10:30
Ben Davies
e8c8e0d9bd Add CommandContext#shouldBroadcast and fix !code permission checks (#6198) 2019-12-28 16:26:50 +09:00
whales
456f987cb3 Give mods access to /host (#6200) 2019-12-23 02:49:23 +09:00
Ben Davies
8470325f35 Commands: Remove some restrictions on /code (#6182) 2019-12-20 00:45:49 +09:00
Kris Johnson
dd016c21ff Add support in /details for Pokemon that require special trading conditions (#6194) 2019-12-19 20:38:05 +09:00
whales
d7c03256aa Fix modchat modlog entry (#6196) 2019-12-19 20:34:30 +09:00
HoeenHero
d8d59dbbae Fix modchat modlog message 2019-12-18 18:11:39 -05:00
whales
8a2969eb18 Fix rebuilding on windows (#6191) 2019-12-17 05:29:24 +09:00
Kris Johnson
42321c5e68 Display Dynamax Power on moves in /details (#6189) 2019-12-16 15:36:28 +09:00
fart
0291eabce3 Include National Dex mons in veekun command (#6186)
Currently fails on Pokemon and moves not included in gen 8
2019-12-16 04:08:48 +09:00
420Blazeitt
59584aea54 Update /smogdex to gen 8 (#6169) 2019-12-11 03:08:15 +09:00
whales
496cbb70db Check permissions for offline warns 2019-12-09 13:49:52 +10:30
Kris Johnson
2854e71166 Fix various evolution methods (#6160) 2019-12-07 17:15:31 +04:00
whales
0b9d8dd109 Support declarative roomsettings syntax (#6119) 2019-12-06 23:16:55 +09:00
whales
06ba503227 Refactor modchat permission check (#6123) 2019-12-01 10:13:22 +13:00
whales
f7d5cefc7d Refactor tournament plugin loading (#6118) 2019-11-30 17:53:01 +13:00
whales
20c708b20a Typescript roomsettings (#6117) 2019-11-30 17:34:14 +13:00
PartMan
37e7189008 Don't display Z-Power for Max moves (#6111) 2019-11-30 10:16:42 +13:00
PartMan
7af93a4a79 Don't display Weight for GMax Pokemon (#6091) 2019-11-29 10:34:54 +13:00
Spandan Punwatkar
b6b66de896 Update Repo Links (#6102) 2019-11-28 12:47:38 +04:00
urkerab
09b66da216 Use Chat.html`` a bit more 2019-11-27 15:14:46 +01:00
Guangcong Luo
5364c63e23 Introduce item.itemUser
`item.itemUser` replaces `item.zMoveUser`, and is a new field
representing a list of possible users of an item, for items that are
restricted to specific species.

`item.zMoveUser` is a base forme for items that affect every forme, and
a forme name otherwise (forme name is currently only used for
`forcedForme` uses).

Arceus is a weird case. Both generic Z crystals and Plates, while
having unique effects on Arceus, also have effects on other Pokémon.
For this reason, Arceus isn't listed as an `itemUser` of either of
these item types - use-cases that want this should also check
`item.forcedForme`.

This is mostly intended to be useful to move-searching and custom
rules (like NatDex, which will only allow past-gen items associated
with removed species).
2019-11-25 15:26:36 +13:00
whales
544d331a65 Report normalized target for hotpatches (#6057) 2019-11-24 10:22:48 +13:00
PartMan
3249a10e03 Display user for GMax moves in /dt (#6059) 2019-11-24 10:22:07 +13:00
Kris Johnson
8370c488ce Fix the evolution method of new Pokemon (#5982) 2019-11-20 21:44:16 +13:00
Alexander B
347714116c Add "Past Gens Only" to gen 8 /dt (#5958) 2019-11-16 20:20:01 +13:00
Guangcong Luo
a01daed212 Fix /rebuild crash 2019-11-16 10:10:33 +13:00
peach
52a10f8291 Fix paths when hotpatching properly 2019-11-15 23:35:56 +10:30
peach
42aec533a6 Fix paths when hotpatching 2019-11-15 23:34:19 +10:30
Kris Johnson
46ad0bccd7 Add Gen 8 Pokemon 2019-11-15 22:01:36 +13:00
Guangcong Luo
23f9bfa1b7
Split up server/chat-commands/ (#5943)
`server/chat-commands.js` is now a directory. It's been split into
`core`, `moderation`, and `admin`. `info` and `roomsettings` from
`chat-plugins` have also moved to `chat-commands`.

Some cleanup:

- Bot commands for inserting HTML into rooms like `/adduhtml` have been
  moved from `info` into `admin`.

- `/a` has been renamed `/addline`, for clarity (and also moved from
  `info` into `admin`).

- Room management commands like `/createroom` and `/roomintro` were
  moved to `room-settings`

- `chat-commands/admin` has been TypeScripted
2019-11-15 11:12:54 +13:00