Commit Graph

1066 Commits

Author SHA1 Message Date
Mia
f949f9ba66 Chat-monitor: Use new spoiler format instead of SPOILER:
Mentioned in Staff, slightly cleaner.
2021-05-06 13:21:54 -05:00
Mia
64b3b554c2 Usersearch: Add namelock buttons
Requested by staff, approved by Ransei.
2021-05-05 16:24:01 -05:00
Mia
a5d3aaee35 Helptickets: Don't display language if set to English in /ht list 2021-05-05 14:27:09 -05:00
Mia
5f21bc1d9d Helptickets: Update language display in /ht list
Staff preferred this, from opinions given when it went live.
2021-05-04 20:54:58 -05:00
Annika
2df7307ca2 Helptickets: Display language in ticket list 2021-05-03 10:35:37 -07:00
Mia
a20f2ebdf2 Helptickets: Add the alias /ht tb to /ht ban
Requested by a few staff
2021-05-03 10:45:46 -05:00
Annika
f6b21b90ce Trivia: Support games with fewer than 3 players
Requested by Trivia roomstaff
2021-05-02 21:36:22 -07:00
Annika
38f16f2097 Trivia: Add a button for signups 2021-05-02 21:34:50 -07:00
Kris Johnson
5331e0e748
Refactor splitTarget to splitUser (#8246) 2021-05-01 00:42:25 -07:00
Guangcong Luo
e450e8082e Fix bug in requireUser refactor 2021-04-30 18:32:43 -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
1b0bcc9000 Usersearch: Remove extraneous linebreaks when there are no online matches 2021-04-29 09:56:20 -05:00
Guangcong Luo
17ca6b271c Add a bit more documentation for plines 2021-04-28 01:53:03 -07:00
Guangcong Luo
09d2b9c514 Deprecate splitTarget with splitUser
(Note that the `splitUser` API isn't stable yet, and a future update
will determine if we want to call the final output `message` or
`rest`.)
2021-04-28 01:45:56 -07:00
Guangcong Luo
9abbe47531
Support setting a default format/mod for commands in rooms (#8237) 2021-04-27 15:38:51 -07:00
urkerab
d4662c4c04
Handle extraneous parentheses again (#8238) 2021-04-27 15:06:51 -07:00
Annika
4bbb809c7b
Mastermind: Fix sorting in getTopPlayers 2021-04-27 09:09:37 -07:00
urkerab
74ed6a3651
/math: Give the negative operator a precedence (#8235) 2021-04-26 18:53:32 -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
Mia
d992b8f5fa
Add more support for custom punishments (#8215) 2021-04-23 22:40:31 -07:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -07:00
Annika
909d4657f4 Trivia: Further clarify typing 2021-04-22 12:38:33 -07:00
Annika
df16828aaf Trivia: Fix typing for TriviaLadder 2021-04-22 12:10:13 -07:00
Mia
5586484622 Hosts: Fix crash 2021-04-22 11:41:16 -05:00
Annika
0e21aebfab Trivia: Improve display for unranked games 2021-04-21 20:27:16 -07:00
Mia
e9b1bfe5f0 Chat-monitor: Fix /filter help
(CommandContext#run does not work for help commands that are arrays)
2021-04-21 08:30:19 -05:00
Annika
d5a4c7d9e2 CommandContext#globalModlog: Make user optional
Global modlog entries aren't always acting on a user, so making this parameter optional makes sense. I also changed them to default to null for consistency with CommandContext#modlog.
2021-04-19 08:53:17 -07:00
Kris Johnson
f4fda49201 Update Battle Factory tests and command 2021-04-16 17:35:26 -06:00
Kris Johnson
e9e58c9f99 Dexsearch: Fix bug with mod parameters 2021-04-15 16:44:44 -06:00
Mia
5ed9517c84 Polls: Increase max question limit 2021-04-15 12:11:33 -05:00
PartMan
54ebe56f20
Scavengers: Escape usernames in /scav status (#8201) 2021-04-15 15:46:43 +02:00
Kris Johnson
a0c3f105b2
Add /filter test (#8197) 2021-04-14 10:15:25 -07:00
Distrib
334df4a744
Announcements: Fix /announcement htmlcreate (#8194) 2021-04-13 14:00:48 -07:00
Mia
1d494b6f2d RPS: Fix bugs with matchups and lower round cap 2021-04-12 10:40:31 -05:00
Leonard Craft III
d1e863b584
Help Tickets: Add cheating report type (#8190) 2021-04-10 01:14:04 -07:00
Annika L
583dceb693 Chat monitor: Weeklock for slurs in Pokemon nicknames 2021-04-08 22:18:38 -07:00
Mia
6605e1e1b7 Autoresponder: Correctly format newlines in FAQs and improve style 2021-04-08 10:04:17 -05:00
Guangcong Luo
5233559183 Refactor Dex types 2021-04-08 07:08: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
Annika
6806b8c3ac Chat monitor: Weeklock for slur evasion 2021-04-06 12:42:42 -07:00
Mia
7ea8cfa668 TOTD: Fix keys[0] not being the nom 2021-04-06 11:58:02 -05:00
Mia
708d81efde OTD: Fix double timestamp display 2021-04-06 11:50:28 -05:00
Mia
4ec9db3489 TOTD: Fix timestamp display and ensure timestamp always exists 2021-04-05 16:01:48 -05:00
Mia
c506b2118c Hangman: Fix caps sensitivity in /hangman untag 2021-04-05 11:25:28 -05:00
Annika
f43795880c Repeats: Ensure repeat IDs aren't empty strings 2021-04-03 18:04:52 -07:00
Mia
46dc3409b6
Helptickets: Notify users of /faq proxy when opening an IP-appeal ticket (#8132) 2021-04-02 22:29:14 -04:00
siteworks
d887c00795
Mafia: Change lynches to vote in the votebox (#8149) 2021-04-02 18:52:13 -04:00
Mia
294e3a4a57
Chat monitor: Refactor to handle private filters better (#8112) 2021-04-01 15:35:37 -07:00