Commit Graph

2896 Commits

Author SHA1 Message Date
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
Annika
c87f63f4f0 /processes: Fix RAM usage display
`ps` reports RSS in kb, not bytes, making /processes off by a factor of 1024
2021-04-17 22:17:48 -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
Annika
9933c4e3f1 Fix lint errors 2021-04-15 09:03:33 -07:00
Mia
fdb1d4b762 Chat: Properly allow banwording new spoiler formatting 2021-04-15 10:33:41 -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
Guangcong Luo
b8681ec288
Use a dispatch system for sockets (#8198)
Instead of using a mega-switch, instead use a dispatch system for the
sockets protocol.

A big advantage is that we don't need to be weird about variable
declarations using this method. We can use `const`s!
2021-04-14 07:18:59 -07:00
Distrib
334df4a744
Announcements: Fix /announcement htmlcreate (#8194) 2021-04-13 14:00:48 -07:00
Marty-D
84301ca382
Admin: Fix typo in processes 2021-04-12 17:36:43 -04:00
Marty-D
4eee39cd4a Revert "Fix suspect test unbans"
This reverts commit 6c3615a6f8.
2021-04-12 17:03:40 -04:00
Marty-D
6c3615a6f8 Fix suspect test unbans 2021-04-12 16:00:53 -04: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
Guangcong Luo
5ece6ec784 Fix /formathelp, but properly this time 2021-04-09 08:09:55 -04:00
Christopher Monsanto
99fd7b8706
Chat: Implement Discord spoilers (#7948) 2021-04-09 01:39:47 -07:00
Annika L
583dceb693 Chat monitor: Weeklock for slurs in Pokemon nicknames 2021-04-08 22:18:38 -07:00
Mia
c43da18531
Admin: Add ram info to /processes (#8189) 2021-04-08 12:19:18 -07:00
Mia
e548579e9b
IPTools: Automatically add Tor IPs to the proxy list (#8188) 2021-04-08 11:34:09 -07:00
Guangcong Luo
cf5b325b62 Fix /formathelp 2021-04-08 13:34:36 -04:00
Mia
1db638815e Moderation: Allow locking hostfiltered users 2021-04-08 11:52:48 -05: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
Quinton Lee
697cd715bb
Add feedback to /sendhtmlpage and /highlighthtmlpage (#8187) 2021-04-07 22:27:39 -07:00
Mia
becb403d17 Chat: Add <youtube> to the list of autoclose HTML tags 2021-04-07 18:37:54 -05:00
Mia
9849c63fef
Room-Battle: Fix timer interaction with choice-blocking moves (#8186)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-04-07 11:26:55 -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
4e6dce1395 Moderation: Properly allow extending namelocks 2021-04-05 14:21:27 -05:00
Mia
c506b2118c Hangman: Fix caps sensitivity in /hangman untag 2021-04-05 11:25:28 -05: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
Annika
f43795880c Repeats: Ensure repeat IDs aren't empty strings 2021-04-03 18:04:52 -07:00
Guangcong Luo
0f127597b5 Shorten unrated matchmaking timer 2021-04-02 23:10:08 -07:00
Guangcong Luo
47da1d61c8 Use the invite form for /importinputlog 2021-04-02 23:00:30 -07:00
Guangcong Luo
368202605f Add Multi Random Battles 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
Mia
46dc3409b6
Helptickets: Notify users of /faq proxy when opening an IP-appeal ticket (#8132) 2021-04-02 22:29:14 -04:00
Ben Baral
f3dc79f949
Update required version of Node.js (#8163) 2021-04-02 19:17:01 -07:00
siteworks
d887c00795
Mafia: Change lynches to vote in the votebox (#8149) 2021-04-02 18:52:13 -04:00
Distrib
9ba6a2e802
Tournaments: Allow regular users to check tour rules (#8161)
PR for https://www.smogon.com/forums/threads/allow-voiceds-and-regulars-to-check-tour-rules.3681028/
2021-04-02 15:38:25 -07:00
Annika
3ecff41881 /hotpatch: Remove non-alphanumeric characters
Today I accidentally typed a space after /hotpatch formats, and I don't see why it should reject that.
2021-04-02 14:22:03 -07:00
Mia
294e3a4a57
Chat monitor: Refactor to handle private filters better (#8112) 2021-04-01 15:35:37 -07:00
Guangcong Luo
c6edf9389f Minor refactor to RPS code 2021-04-01 15:07:27 -07:00
Mia
a9d9c5b09b Room-battle: Improve handling of forfeits in multi battles 2021-04-01 13:54:25 -05:00
Mia
960548cd65 Room-battle: Improve handling of forfeits in multi battles 2021-04-01 13:43:50 -05:00
Mia
4bfbd1b78d Fix build 2021-04-01 10:27:23 -05:00
Guangcong Luo
86df524adc Support forfeiting in free-for-all battles
I honestly don't understand HOW it works, but it definitely works.
2021-04-01 04:44:16 -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
f7044d542a Admin: Fix crash in /processes 2021-04-01 00:29:49 -05:00
Mia
f19f464ea7 Chat: Properly remove old data for some onRename handlers 2021-04-01 00:24:54 -05:00
Mia
b7680c783d
Add infrastructure to rename chat plugin data with rooms (#8153) 2021-04-01 01:23:01 -04:00
Spandan Punwatkar
b77d6cb20f
Add simulator support for multi battle (#7929)
This doesn't include matchmaking support (which had to be removed
for reworking), but it includes everything else.

Co-authored-by: Spandamn <spandan.punwatkar@gmail.com>
Co-authored-by: MacChaeger <msaimrkon@gmail.com>
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-03-31 22:22:25 -07:00
Mia
a353e9ab43 Hangman: Fix case insensitivity in /hangman addtag 2021-03-29 21:11:00 -05:00
Guangcong Luo
d4b6ba4c0f Allow passing teams to random formats
The team validator will now complain if try to bring a team to a random
format. Also, if you bypass the validator (such as with
`/importinputlog` or using the JS API directly), you can now use custom
teams in random formats.

Fixes #8144
2021-03-29 10:28:00 -07:00
PartMan
fb51d2d769
Scavengers: Make !scav queue broadcastable (#8131) 2021-03-26 19:23:04 -07:00
Mia
b9d6b3e3f3
Punishments: Don't warn / mark staff users in banned groupchats (#7669) 2021-03-26 15:29:41 -07:00
Annika
ca9d8d31a8 Fix visual glitch in /randbats in Gen 1 2021-03-26 08:53:49 -07:00
Mia
fc75878432 Fix loading ranges in Punishments.sharedIPBlacklist 2021-03-26 09:26:03 -05:00
Annika
af8b286d2c Mastermind: Fix leaderboard bug and add aliases 2021-03-25 13:32:00 -07:00
Mia
4f31d369f5 Add an easy way to disable battlesearching commands 2021-03-25 12:24:12 -05:00
Guangcong Luo
49b32b2afe Don't accelerate the timer in challenge games 2021-03-24 19:24:43 -07:00
Mia
0c849570d2
Hangman: Support tagging premade phrases (#8133) 2021-03-24 16:10:33 -07:00
Kris Johnson
2e4eaf97e7 Announcements: Mark formatted text as trusted 2021-03-23 12:47:40 -06:00
Kris Johnson
dbc75a0ed5 UNO: Add a missing space when listing players 2021-03-23 02:37:16 -06:00
Mia
b21def4e91
Help tickets: Refresh /ht list on ticket update (#8113) 2021-03-22 15:55:58 -07:00
Mia
0c366ce2cc
Support tempbanning names with no known user (#8115) 2021-03-22 15:55:08 -07:00
Annika
4cf03154e9
Don't allow setting modchat above one's rank (#8130) 2021-03-22 15:49:56 -07:00
Mia
a15268f9c1 Helptickets: Remove extraneous 'month' from staff stats page 2021-03-22 13:31:42 -05:00
Distrib
0bd9f47324
Datasearch: Improve dexsearchhelp & movesearchhelp (#8066) 2021-03-21 18:42:04 -07:00
Annika
c1fa436e35 Trivia: Implement a /trivia unrankednew command
This enables the creation of Trivia officials that do not reward points.
2021-03-20 12:30:46 -07:00
Annika
6ecf74fa55 /randbats: Don't display Gmax sets in old gens 2021-03-20 12:30:46 -07:00
Distrib
2b610c039f
Tournaments: Add readmore for tour rules (#8128)
Pr for https://www.smogon.com/forums/threads/tour-getrules-tour-viewrules-codes.3673252/
2021-03-20 12:30:13 -07:00
Annika
1a8e65bbd9 Improve the /randbats command for Gmax sets 2021-03-19 20:48:57 -07:00
Mia
1623cf40d9 TOTD: Fix generated help 2021-03-18 15:02:42 -05:00
Mia
666773b561
TOTD: Fix /-otd toggleupdate and clean up (#8126) 2021-03-18 10:14:54 -07:00
Mia
32d727a3ea
TOTD: Fix legacy loading (#8125) 2021-03-18 08:23:04 -07:00
Mia
b02f44b1f1 Fix build 2021-03-18 10:14:16 -05:00
Mia
5a3d6067b2 TOTD: Restore old method of updating command table 2021-03-18 10:12:37 -05:00
Mia
70f8970825 TOTD: Fix -otd help 2021-03-18 09:53:45 -05:00
Mia
9bb9b44295
Thing of the Day: Refactor storage / remove hardcodes (#8119) 2021-03-18 07:08:33 -07:00
Mia
bfafdb0936
Admin: Ignore the current 'ps' process in /processes (#8049) 2021-03-18 07:07:11 -07:00
Guangcong Luo
9f8633ea10 Fix ladder double-update issue
Caused by #8015 incorrectly copy/pasting only parts of #7960.

I also cleaned up the ladder fast-update code while I was working
on this.
2021-03-18 10:00:11 -04:00
Mia
c4b23e790d
Helptickets: Automatically save replays linked in tickets (#8120) 2021-03-18 00:21:21 -07:00
Mia
6259ce27f8 Chat-monitor: Properly modlog /allowname names 2021-03-17 14:07:37 -05:00
Mia
5a38060315 Moderation: Properly reset user.trusted on demotion 2021-03-16 13:49:16 -05:00
Mia
523f572bec Helptickets: Handle gbanned namelocked users properly 2021-03-15 16:24:42 -05:00
Mia
ea3bd8303f
Roomstats: Display total stats and handle empty logfiles better (#8117) 2021-03-15 07:54:21 -07:00
fart
f07abc96b3
Add alias for /poll queuehtml (#8118)
Some staff have expressed confusion on the syntax of queueing HTML polls, since it is inconsistent with /poll htmlcreate, where html- comes before create (compared to queuehtml, where -html comes after). Instead of changing it entirely and causing additional confusion for people who got used to one command, this allows either command to be used. Further, the command for queuing HTML polls was not listed in the help for the command.
2021-03-15 03:42:04 -07:00
Mia
a4641eaf58
Fix /mafia extend in pages 2021-03-12 16:40:50 -06:00
Mia
9db563794b Fix crash in logging chat in inputlogs 2021-03-11 18:16:20 -06:00
Mia
15af69ab5b Moderation: Properly autojoin staff room on global promotion 2021-03-11 18:10:27 -06:00
Mia
92bc1bdb2d Roomsettings: Explicitly set modchat permissions
Currently, staff can turn modchat off, even if the rank is above them. According to both Zod and Aeo, this should never happen, so this fix is very direct for a reason. (this happens because modchat is set to 'a' in config.groups, but we aren't changing that since it may have more side effects. This is clearer, anyway.)
2021-03-11 17:03:31 -06:00
Mia
7f928e9837 Thing of the Day: Use writeUpdate() 2021-03-10 20:22:50 -06:00
Annika
3a99efbb0e Add a /randombattlenodmax command 2021-03-10 17:48:05 -08:00
Annika
c079677e15 Fix /trivia migrate 2021-03-10 09:08:40 -08:00
Mia
83b82c9f0e Hosts: Properly validate hosts in /nomarkshared add 2021-03-09 10:06:13 -06:00
Mia
d1af6d180b Fix build 2021-03-08 17:18:56 -06:00
Mia
b8ae8c9ef0 Admin: Document exclusion in keysToCopy 2021-03-08 08:41:09 -06:00
Mia
07b1c01f75
Support hotpatching User/Room/ProcessManager protos (#8095) 2021-03-08 05:23:17 -08:00
Annika
36c4dd7fec
Update comment to reflect the build script (#8107)
As far as I know, our documentation recommends using `node pokemon-showdown` to start PS, not `node build && node .server-dist/index.js`.
Thus, I don't think the latter is considered starting PS normally.
2021-03-08 02:40:45 -08:00
Mia
f8cea3e4a0 Fix namelocks not applying properly 2021-03-07 19:54:02 -06:00
Annika
88fa8e2971 Remove /randset
This command isn't seen as useful by the randbats and is buggy
2021-03-04 15:44:00 -08:00
Mia
9e0c1b7894
Restore /potd (#8092) 2021-03-03 18:24:57 -08:00
Mia
daf71a699e /randset: Handle random-teams not existing 2021-03-03 19:48:04 -06:00
Kris Johnson
be03d69dc8 Tournaments: Make rules capitalization consistent 2021-03-03 18:34:19 -07:00
Annika
75ed11e2aa Trivia: Fix /trivia lastofficialscore 2021-03-03 15:43:07 -08:00
Annika
c58d9ae959 Trivia: Use an Object, not a Map, for old scores
Maps are serialized to JSON as Objects, so this caused the type signatures to be incorrect when data was loaded from JSON.
2021-03-03 15:36:47 -08:00
Mia
9402a8814c
Fix crash in /randset (#8079) 2021-03-03 13:52:55 -08:00
Mia
736e38e4af
ProcessManager: Handle Monitor#slow in subprocesses (#7990) 2021-03-03 12:39:53 -08:00
Kris Johnson
987c8d95d4 Datasearch: Fix crash 2021-03-03 12:44:30 -07:00
cheesetheorange
936b7bf15c
Hangman: Correctly check guesses with numeric characters (#8056) 2021-03-01 13:01:16 -08:00
pyuk-bot
e3d13f821d
Dexsearch: use optional chaining in getMod() (#8091) 2021-03-01 12:09:57 -07:00
Mia
5d5b831275 Datasearch: Fix crash in PM 2021-03-01 12:46:13 -06:00
Kris Johnson
50fef2bc68 Fix crash in /ds 2021-03-01 10:32:08 -07:00
PartMan
fe1d15b34a
Scavengers: Display host's username when hunt ends (#8090) 2021-03-01 11:24:12 +01:00
Mia
5dd0da602d
Help tickets: Refresh ticket list in 'more tickets' button on click (#8080) 2021-02-28 18:41:21 -08:00
Mia
0d8e4d4542 Moderation: Fix /globaldeclare's help 2021-02-28 18:32:54 -06:00
Kris Johnson
aeecf8d24c
Dexsearch: Add support for searching by mods (#8064) 2021-02-28 14:37:00 -08: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
ayiadvance
23352312de
Change lynch to vote for public messages and add a vote alternative to lynch commands. (#8081) 2021-02-28 08:02:54 -05:00
Mia
6cccd0935a Revert /show and /requestshow to use <youtube> again 2021-02-27 22:33:13 -06:00
Mia
1c75a2a450 Polls: Fix /poll timer display 2021-02-26 17:56:22 -06:00
Mia
3e1658ee07 Minor activities: Fix clearing queue 2021-02-26 17:51:50 -06:00
Annika
fa889d5280 Add a /randset command 2021-02-26 14:34:04 -08:00
Mia
d50f5823ae Searchlogs: Properly handle deleted rooms 2021-02-26 13:52:25 -06:00
Annika
e4f02e77cb Punishments: Disconnect unregistered banned users
Globally banned users should always be disconnected if they are reusing their username. However, the punishments should only be applied to the user object if it's a registered name, in case someone accidentally logs into a banned name.
2021-02-25 18:20:54 -08:00
Zorquax
f47855c863
Mafia: Add /unwin command (#7955) 2021-02-25 15:40:59 -08:00
Mia
a596b7988b
Moderation: Don't hidetext for locks in tickets (#8072) 2021-02-25 06:51:16 -08:00
Christopher Monsanto
ff93e9865f thing-of-the-day: Don't display nomination list in A/M after nom 2021-02-25 09:22:49 -05:00
Annika
11b7245c99 Room FAQs: Don't allow empty FAQ entries 2021-02-22 14:56:50 -08:00
Annika
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00
Kris Johnson
80ad124388
Mafia: Fix IDEA picking 2021-02-21 15:11:02 -07:00
Mia
312d410b69 Mafia: Fix /mafia unlynch 2021-02-19 08:21:30 -06:00
Annika
ea76fc3717 Fix error message in /ipsearch
https://www.smogon.com/forums/threads/staff-suggestions-bugs.3514540/page-19#post-8758269
2021-02-18 21:43:32 -08:00
Mia
66f717424a Mafia: Fix /ideapick 2021-02-18 09:28:37 -06:00
Mia
9b33890cce Mafia: Fix /mafia sub 2021-02-17 15:30:15 -06:00
Annika
62056a33a9
Mafia: Fix bugs caused by not using /msgroom 2021-02-16 21:19:51 -08:00
Kris Johnson
82b20aaf8e
Use /msgroom in more places (#8042) 2021-02-16 20:10:05 -08:00
Annika
8b79c9d13f
Add another article to /intro (#8046) 2021-02-16 20:04:38 -08:00
Mia
fffc564c24
Add 'ps' output to /processes (#8047) 2021-02-16 20:04:03 -08:00
Annika
51883cc0bb Trivia: Don't reset scores twice 2021-02-16 08:57:08 -08:00
Annika
39439385df Trivia: Attempt to fix crash
I don't actually know what causes the crash on line 825, but my best guess is that one of the winners didn't have points, and thus got skipped in the `for` loop that initializes leaderboard entries.
2021-02-16 08:54:38 -08:00
Kris Johnson
4d9b993105
Suspect Tests: Add a whitelist (#8020) 2021-02-15 18:21:45 -08:00
Kris Johnson
3fbb9405dc
Usersearch: Make page forcerenames log to staff (#8035) 2021-02-15 16:11:25 -05:00
Mia
b1b29daeec
Chat: Fix parseSpoiler adding undefined strings (#8037)
And fix /forcerename
2021-02-15 15:59:20 -05:00
Guangcong Luo
61ea2dd916 Implement Utils.escapeHTMLForceWrap
Combining escapeHTML and forceWrap allows us to use <wbr /> instead
of U+200B, fixing a copy/paste bug.
2021-02-15 06:09:58 -05:00
Guangcong Luo
0dc3070229 Fix /hangman terms 2021-02-15 06:09:58 -05:00
Guangcong Luo
e1ac274b5a Deprecate /ioo 2021-02-15 05:56:44 -05:00
Mia
a6520350d3
Implement /msgroom (#8036) 2021-02-15 02:54:35 -08:00
Distrib
640eed65d1
Hangman: Improve hangman terms (#8027) 2021-02-15 02:47:14 -08:00
Distrib
313a51652a
UNO: Add /uno cards command (#8001) 2021-02-15 01:56:57 -08:00
Mia
4f0ff8cc96
Youtube: Support Twitch streams/channels (#8005) 2021-02-15 01:54:49 -08:00
Guangcong Luo
bce402d021 Fix context.parse() returning a string 2021-02-15 01:51:41 -08:00
Mia
f2f17885db
Deprecate /groupchatban (#8028) 2021-02-15 01:35:59 -08:00
Mia
5ec2172647
Moderation: Add spoilers support to more commands (#8033) 2021-02-15 01:33:43 -08:00
Annika
8f5c75cc76
Fix typo 2021-02-14 11:45:42 -08:00
Annika
2b2f5f37ba
Hangman: Fix crash when a room has no saved words 2021-02-14 11:45:18 -08:00
Mia
010ffe1a41
Admin: Fix /disablecommand message (#8019) 2021-02-13 23:19:59 -05:00
Volco
99cb8ea055
Fix helptickets game.ticket setting to undefined (#8000) 2021-02-13 23:18:40 -05:00
Mia
3d820cf38d
Ladders: Fix crash (#8015)
* Ladders: Fix crash

* OK

* Update ladders-remote.ts

* Update server/ladders-remote.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update server/ladders-remote.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-02-13 18:18:06 -08:00
Kris Johnson
0583a61e4c
Add a chat page for /usersearch (#8022) 2021-02-13 18:01:25 -08:00
Kris Johnson
b8cbee3944
Update OMotM/LCotM aliases (#8025) 2021-02-12 19:06:11 -07:00
Annika
1c8b5f73c1
Hangman: Fix bug with whitespace
Whitespace was tripping the chat filter for hangmans.
2021-02-11 15:49:20 -08:00
Kris Johnson
f347f4d4f2 Room FAQs: Fix grammar 2021-02-11 14:31:58 -07:00
zgeorgecsat
d692f2d0e2
Fix /mafia unhostban (#8012) 2021-02-10 21:22:58 -08:00
Mia
c9cbc8268f
Usergroups: Remove deprecated 's' permission (#7676) 2021-02-10 02:23:20 -08:00
Volco
0290643948
Fix minor activity timer not queuing polls (#8002) 2021-02-09 21:01:34 -08:00
Distrib
6aa8e268ce
Uno: Fix crash (#8016) 2021-02-09 17:31:06 -08:00
Annika
5333b4629d
Revert "Calculate and display Elo change on server (#7960)" (#8014)
This reverts commit b87dd717f6.
2021-02-09 11:06:42 -08:00
Annika
60e063ff01 Trivia: Add /trivia lastofficialscore
Requested by @TheMezStrikes
2021-02-09 10:41:00 -08:00
Annika
23f0c42ca4 Trivia: Always display question numbers 2021-02-08 22:26:06 -08:00
Annika
6398bb67ee Remove /unbanall
Approved: https://discord.com/channels/534298043176976395/565617827298541572/783311845279662120
2021-02-08 20:24:05 -08:00
Annika
963a269912 Trivia: Properly display question-based scorecaps 2021-02-08 17:59:40 -08:00
Annika
cd2e7325e8 Trivia: Fix confirmation for /trivia migrate 2021-02-08 16:59:58 -08:00
Annika
a14ea20be4 Trivia: Add a /trivia migrate command 2021-02-07 21:21:59 -08:00
Annika
3e4349d41b Trivia: Fix prizes for question-capped games 2021-02-07 21:01:16 -08:00
Annika
8bf6b92b99 Trivia: Support capping games by questions asked 2021-02-07 21:00:04 -08:00
Annika
ff55a87484 Trivia: Add a /trivia moveusedevent command 2021-02-07 21:00:04 -08:00
Distrib
27f103fd67
Announcements: Don't re-display on hotpatch (#7999) 2021-02-07 04:43:38 +04:00
Distrib
4944b111eb
UNO: Fix double turn after auto-disqualification (#7996) 2021-02-05 22:47:38 +04:00
DayanYT
b996f7283e
Mafia: Fix typo (#7995) 2021-02-05 09:58:04 -05:00
Annika
204bfad9b1 Trivia: Add "Event" and "Event (used)" categories
These categories are special–questions in the Event category move to Event (used) after they're asked in a game. Requested by QW mods and ROs
2021-02-04 15:54:18 -08:00
Annika
b46e90db73 Trivia: Use object spread for ALL_CATEGORIES 2021-02-04 15:51:41 -08:00
Annika
2dd9d252d5 Trivia: Fix crash in /trivia qs
Previously, /trivia qs crashed if no questions had ever been added to the category.
2021-02-04 15:49:44 -08:00
Guangcong Luo
aefe861568 Allow drivers to use /host
Drivers can see IPs in certain specialized conditions, which makes
`/host` a useful and harmless tool for them.
2021-02-03 22:51:42 -08:00
Instruct
7989e4df4f
/battlefactory: Fix searching for nonexistent tiers (#7989)
* BF cmd: Fix crash searching for a valid tier not included in a specific gen

* Update server/chat-plugins/random-battles.ts

* Update server/chat-plugins/random-battles.ts

* Update server/chat-plugins/random-battles.ts

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2021-02-02 21:56:08 -07:00
Guangcong Luo
782f316dd9
Merge BattleStream and RoomBattleStream commands (#7988)
RoomBattleStream originally overrode `_writeLine` in #5428 because
`>eval` had a dependency on `Chat.stringify`, and we were trying to
separate sim and server.

`Chat.stringify` is now `Utils.visualize`, so there's no more reason
for the separation. In addition, the separation is actively bad,
because it makes it impossible to import certain inputlogs outside
of the simulator.
2021-02-02 15:03:03 -08:00
Guangcong Luo
148439dc27 Refactor /editbattle
This moves the `player()` and `pokemon()` functions to be defined
inside `eval`, allowing them to be used by `>>>` and `/evalbattle`.

This should hopefully make the commands more readable as well.
2021-02-02 13:52:16 -08:00
Guangcong Luo
796be8da60 Implement /ebat reseed
Fixes #7963
2021-02-02 13:45:34 -08:00
Distrib
cf9f7a5a19
UNO: Fix turn order after a disqualification (#7944) 2021-02-02 12:03:46 -08:00
aQrator
271bed474f
Update scavengers.ts (#7986)
Fix /scavhelp to say /scavhelp staff instead of /roomhelp staff
2021-02-03 00:02:29 +04:00
Mia
b97ba59149
NN filters: Parse /me properly (#7987) 2021-02-03 00:02:00 +04:00
Mia
13a2a802a1
YouTube: Add a command to disable the interval (#7984) 2021-02-02 11:11:54 -08:00
aQrator
77b2ef6c48
Scavengers: Update /scavhelp (#7985) 2021-02-02 11:11:37 -08:00
Volco
88d9ec5e91
Fix crash that prevents the server from booting (#7983) 2021-02-02 11:05:14 -08:00
Mia
4c60f05994
NN Filters: Add a command to train on logs from a room (#7981) 2021-02-01 17:30:50 -08:00
Mia
98ea14dce3
Spotlights: Store image data (#7978) 2021-02-01 16:37:17 -08:00
TheMezStrikes
838871877d
Add CAP Project forum link (#7982)
This used to not be necessary but the main website is criminally outdated. Requested by CAP room leadership
2021-02-01 17:29:08 -07:00
Mia
daf650d174
Rooms: Fix automodchat (#7979) 2021-02-01 16:18:36 -08:00
Guangcong Luo
ec0b96e93d Fix delete button on Poll queue page
Fixes #7832
2021-02-01 16:13:07 -08:00
Mia
207d234260
Youtube: Notify room of starting groupwatches (#7980) 2021-02-01 12:07:40 -08:00
Kris Johnson
7f4c8c2831
Add help for /automodchat 2021-01-31 23:28:46 -07:00
Guangcong Luo
c27f2cd381 Deprecate /ionext
Most current use-cases should be using /hidenext.

The long-form /inviteonlynext is still available for anyone who really
wants it, but in theory it doesn't offer any benefits.
2021-01-31 21:41:57 -05:00
Guangcong Luo
93e921360e Better infer bases in /math 2021-01-31 18:10:37 -08:00
DayanYT
fd0e01ad6c
Calculator: Support h, o and b suffixes for base 16, 8 and 2 numbers (#7949) 2021-01-31 18:10:16 -08:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Mia
2bdc77cc3d
Net filters: Fix error handling and make improvements (#7974) 2021-01-31 11:26:16 -08:00
Dylan S
b87dd717f6
Calculate and display Elo change on server (#7960) 2021-01-31 11:13:59 -08:00
Mia
a8edba9bd3
Minor activities: Don't re-display on hotpatch (#7970) 2021-01-31 00:36:07 -08:00
Mia
a6a12f0570
Info: Add a /faq for pages/proxyhelp (#7958) 2021-01-30 23:19:14 -08:00
Mia
f6491e61ea
Youtube: Add a command to list groupwatches (#7964) 2021-01-30 22:57:02 -08:00
Guangcong Luo
747974db34 Support diacriticals in Hangman
We now support the entire gamut of Unicode. You can still only guess the
26 English letters, though.
2021-01-30 23:02:56 -05:00
Mia
335eafba95
Add machine-learning based monitors (#7937) 2021-01-30 17:40:01 -08:00
Mia
727d6a4498
Monitor: Standardize slow logging (#7969) 2021-01-30 13:32:06 -08:00
Mia
f4d78b8395
Fix build 2021-01-30 15:08:50 -06: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
0ad5c41896 Chatlog: Restrict access to slowlog roomlogs 2021-01-30 14:40:15 -06:00
Mia
8f4b07b163 Chat: Fix logging of slow commands in PM 2021-01-30 13:55:11 -06:00
Mia
e411890a47 Fix PM duplication 2021-01-30 13:41:47 -06:00
Guangcong Luo
f4abf52f61 Fix QueryProcessManager type signatures 2021-01-30 11:35:35 -08:00
Annika
353a81e3d4 Modlog: Properly implement timing of searches 2021-01-30 10:51:33 -08:00
Mia
8cf667a78d
Chat: Properly log slow async commands used in PM (#7966) 2021-01-30 09:41:40 -08:00
Guangcong Luo
cb7430ecfd Refactor logSlowMessage
Fixes #7962
2021-01-29 18:16:24 -05:00
Mia
6b4507aba9
Chat: Track slow async commands (#7961) 2021-01-29 08:59:20 -08:00
Guangcong Luo
cb65fb868d Properly fix Auth#hasPermission 2021-01-28 22:04:03 -08:00
Annika
b92924fc8b Fix Auth#hasPermission
As per the discussion in #sim-dev:
  - Global permissions should always use User#tempGroup
  - Room permissions should check both the roomauth list and user and User#tempGroup
2021-01-28 18:42:16 -08:00
Guangcong Luo
1fc92ef977 Fix bugs in inRooms/games refactor 2021-01-28 20:35:30 -05:00
Guangcong Luo
5ace098eb5 Fix validator crash reporting
Validator crashes weren't being reported to the dev room. This fixes that.
2021-01-28 20:35:30 -05:00
Annika
1f7ea9e990 Fix bug with permission jurisdictions
This bug allowed people to punish people of the same and higher ranks. Monkeypatched on main.
2021-01-28 13:33:23 -08:00
Mia
3479c1f5e0 Admin: Allow dev staff to use /processes 2021-01-28 15:00:05 -06:00
Kris Johnson
081326b69c
Refactor minor activities (#7766) 2021-01-28 12:12:54 -08:00
Mia
a63fb0074a
CommandContext: Add a method for refreshing html pages (#7666) 2021-01-28 12:10:50 -08:00
Mia
1654307731
Helptickets: Fix bugs with unbanning (#7883) 2021-01-28 11:43:44 -08:00
Mia
c1cd4630b1
Users: Automatically expire inactive connections (#7957) 2021-01-28 11:43:02 -08:00
Mia
184e867761
Hangman: Support saving hangman entries (#7630) 2021-01-28 11:24:46 -08:00
Mia
db92804541
Support automodchat when all roomstaff are offline (#7810) 2021-01-28 11:14:55 -08:00
Mia
2688c21351
Improve /usersearch (#7956) 2021-01-28 10:54:21 -08:00
Distrib
4b404f5765
Improve /offertiehelp (#7952) 2021-01-28 10:43:06 -08:00
Mia
5c9c84c415
Remove User#inRooms and User#games (#7815) 2021-01-28 10:41:35 -08:00
Mia
11e4dcd272
Support using more moderation commands offline (#7742) 2021-01-28 10:41:24 -08:00
SirKira(!Uzumaki)
fad8e27b7e
Mention groupchat restrictions in /help makegroupchat (#7931)
* Change help for makegroupchat.

* Update server/chat-commands/room-settings.ts

thanks

Co-authored-by: Annika <annika0uwu@gmail.com>

Co-authored-by: Annika <annika0uwu@gmail.com>
2021-01-26 09:12:38 -08:00
Mia
a896f2e73a
Moderation: Log Owner forcepromotes to Staff/Upper Staff (#7951) 2021-01-26 09:10:48 -08:00
Distrib
0ab6bcb80a
Daily spotlight: Display raw text in /daily (#7947) 2021-01-25 08:59:39 -08:00
Annika
70e41af150 Include rangelocks in Punishments#getPunishments 2021-01-24 22:10:47 -08:00
Distrib
fecfc9f846
Room FAQs: Display raw text in /rfaq (#7928) 2021-01-23 04:37:44 -08:00
Distrib
c30d8cd125
Room Events: Imrove raw text in /events view (#7933) 2021-01-23 04:37:03 -08:00
TheMezStrikes
593e589bb4
Default sendhtmlpage to all connections (#7939) 2021-01-23 04:36:05 -08:00
Instruct
0d1c9fe098
SSB4: Bugfixes and Balance Patches (#7889) 2021-01-22 14:56:26 +04:00
Annika
e6e3421611
Add subcat1 as an alias for subcat
Requested by aegii
2021-01-21 21:47:28 -08:00
zgeorgecsat
c0df565f3c
Mafia: Implement gamebans, various updates (#7867)
* Plurality shift is now shown upon hammer.

* Removes night responses drop down option.

* Adds error reply if user tries to use an argument with /mafia action.

* Lists cohosts on the mafia page.

* Playerlists are alphabetized.

* Declares when closed setup is turned on.

* /mafia kill kills multiple users separated by commas.

* Changes for checks

* Add gamebans/refactor hostbans to use Punishments

* Small fixes

* Change for checks

* Suggestions

* Updates for checks

* Make takeidles default and change game name to Mafia

* Update mafia.ts

* Use this.room
2021-01-22 00:52:28 +10:30
Mia
4c69e581fc
Prevent non-trusted users creating groupchats (#7927) 2021-01-19 13:35:15 -08:00
SirKira(!Uzumaki)
071cf40d30
Fix double box in YouTube channel display (#7861) 2021-01-19 09:03:07 -08:00
Adam Tran
14744879c8
Fix excluding variables in /ms (#7859) 2021-01-18 11:42:58 -06:00
Mia
20be102fa0
Usergroups: Fix atLeast whitelist handling (#7905)
* Usergroups: Fix atLeast whitelist handling

* Update server/user-groups.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-01-15 18:30:26 -08:00
Mia
996f8c766e
Punishments: Support ranges in /nomarkshared (#7913) 2021-01-15 17:38:13 -08:00
Mia
02ba681e40
Moderation: Support week namelocks (#7912) 2021-01-15 17:20:26 -08:00
Leonard Craft III
40731a74e8
Improve help ticket roomintro CSS (#7915) 2021-01-14 20:21:47 +04:00
Guangcong Luo
1558811b03 Refactor Polls for Chat.ErrorMessage
Also adds an error message for "option already selected".
2021-01-12 19:58:34 -08:00
Annika
8c65fada6d Trivia: Clarify error message 2021-01-12 16:36:42 -08:00
Kris Johnson
2ff6598905 Tournaments: Fix bug with playercap roomsetting 2021-01-11 17:35:30 -07:00
Guangcong Luo
8fcdf1a895 Fix people voting >1 time for one poll option
Fixes #7906

Fixes https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/page-40#post-8685683
2021-01-11 16:23:12 -08:00
Distrib
aa501ecaa7
thing-of-the-day: Fix text bug (#7907)
https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/page-44#post-8710248
2021-01-11 15:48:16 -08:00
Mia
8c27482c88
Permissions: Fix bug in adding namespaces (#7903) 2021-01-11 15:34:39 -08:00
Mia
121e93524c
Add a command for searching groupchats (#7900)
* Add a command for searching groupchats

* OK
2021-01-11 01:27:59 -08:00
Distrib
045a15f0bd
Poll: Fix viewqueue (#7902) 2021-01-10 13:49:18 -08:00
The Immortal
3ae56399bd Label Pokemon banned from LC as NFE 2021-01-11 00:29:18 +04:00
Lionyx
0cb548692b
Update the beginner's guide's link (#7901) 2021-01-10 17:11:48 +04:00
Guangcong Luo
a68656a8e7 Support destroying rooms in unit tests
Matchmaking unit tests currently rely on destroying and re-creating a
user causing them to forget about battles they're in, which is not
actually supposed to happen, and breaks #7815.
2021-01-10 03:39:01 -08:00
Mia
6ae859326d Helptickets: Update the #hostfilter lock page description 2021-01-09 20:29:28 -06:00
Mia
ca94dea20f
FS: Fix hotpatching and add more throttling (#7878)
- `writeUpdate` state is now stored in a global variable, so hotpatching doesn't crash it
- throttling now writes on the tail (so two throttled `writeUpdate` calls will write one update, not two)
- room settings, punishments, and helptickets are now throttled
2021-01-09 15:49:30 -08:00
Mia
d5e7f3f778
Modlog: Add more shorthand commands (#7896) 2021-01-09 01:00:05 -08:00
Distrib
270a55ef0b
Improve /help events (#7895)
Pr for imrove help events, same https://github.com/smogon/pokemon-showdown/pull/7828
2021-01-08 19:18:21 -08:00
Kris Johnson
883cb02152
Tournaments: Fix bugs with replacing users (#7890) 2021-01-08 11:26:54 +04:00
Annika
88da40d046
Roomlog: Support getting total linecount (#7885) 2021-01-07 13:10:23 -08:00
Annika
2a54d9d82e
Chat monitor: Add ƞ to evasion regexes 2021-01-07 12:32:59 -08:00
Kris Johnson
7bb99e2abb
Add roomsettings for tournaments (#7876)
* Add roomsettings for tournaments

* gar ehseth et hseh

* aeth srth esg
2021-01-05 14:15:57 -08:00
Distrib
0b2e07dd3e
Add alias for /cleartext (#7850)
* Add alias for /cleartext

Pr for https://www.smogon.com/forums/threads/add-a-short-alias-for-hidetext-hidelines-and-cleartext.3673226/#post-8700023

* Update server/chat-commands/moderation.ts

Co-authored-by: Annika <annika0uwu@gmail.com>

Co-authored-by: Annika <annika0uwu@gmail.com>
2021-01-05 14:12:51 -08:00
Mia
6ca74b025f Chat: Properly sort filters by priority 2021-01-05 14:24:53 -06:00
Mia
40cc33fcfd
Chat: Add support for private pages (#7877) 2021-01-04 10:15:42 -08:00
Guangcong Luo
6b3a3070c9 Refactor team validator for readability
`checkLearnset` has been renamed `checkCanLearn`.

`reconcileLearnset` has been replaced with `validateMoves`, which
bundles the actual `checkCanLearn` calls with the old
`reconcileLearnset`, making for a better name.
2021-01-03 23:26:20 -08:00
zgeorgecsat
6c5a74c949
Mafia: Refactor for errorReply/requireGame (#7862)
* Changed to errorReply and requireGame whenever applicable/

* Use Chat.ErrorMessage in canJoin
2021-01-03 11:44:43 -08:00
PartMan
6597ef0f15
Add multi-hit as a parameter to /ms (#7855)
* Add multi-hit as a parameter to /ms

* Revert /help ds, add multihit to /help ms, fix TS

Code linted, let's go
'Tis coding at midnight
Save what had been tossed...
Bring back the older line...
The older line.

* ;-;

  1465 passing (25s)
  53 pending


> pokemon-showdown@0.11.4 posttest /home/partman/Documents/Code/pokemon-showdown
> npm run tsc


> pokemon-showdown@0.11.4 tsc /home/partman/Documents/Code/pokemon-showdown
> tsc


No idea why this wasn't caught.

* Fingers crossed
2021-01-03 11:42:27 -08:00
Guangcong Luo
ad656f67e4 Keep track of why moves can't be learned
The validator will now always know and be able to report exactly why
a move can't be learned, instead of sometimes not being able to figure
it out.
2021-01-03 09:53:04 -08:00
urkerab
5cb927d439
Remove variables made redundant by PR #7663 (#7873)
The `hotpatchVersions` variable was only used by `requiresForce`.

The `patch` variable no longer provides any benefit over `target`,
so I removed it too.
2021-01-03 21:17:30 +04:00
Plato
0731a47deb
Repeats: Fix private mod actions (#7865) 2021-01-01 14:07:16 -08:00
Kris Johnson
8b78eeb011 Fix HTML polls 2020-12-31 14:16:20 -07:00
Mia
cf9b7a3eb3
Support spoiler: for private reasons in /namelock (#7858) 2020-12-30 17:45:40 -08:00
Guangcong Luo
c44af3286d Implement Utils.forceWrap
I wrote a `forceWrap` method to support break-word wrapping in table
cells for scavengers, but apparently code blocks need it too, so I'm
moving it to Utils.

Fixes #7854
2020-12-30 17:41:41 -08:00
Instruct
e56d470671
Dexsearch: Add Strength Sap & Jungle Healing to list of recovery moves (#7851) 2020-12-30 02:29:59 +04:00
AeonicX7
2edfe301fd
Fix typo in /help battlesearch (#7852) 2020-12-29 14:16:32 -08:00
Kris Johnson
60cf560f9f
Repeats: Simplify code and fix bug (#7849)
* Repeats: Simplify display checks and fix bug

* Oops

* b
2020-12-29 03:57:18 -08:00
Mia
05295e356a
Modify uses of <youtube> tag to comply with API ToS (#7848) 2020-12-28 22:09:32 -08:00
Annika
3c0b07323d
Repeats: Use trusted text formatting
Requested by Kris; follows the precedent of roomfaqs
2020-12-28 21:56:01 -08:00
Guangcong Luo
d4876ff303 Improve safety of Punishments hotpatching 2020-12-28 08:50:42 -05:00
Guangcong Luo
99f5234e75 Fix a bunch of bugs in Polls/Announcements
- Polls were always starting as quizzes even when they weren't

- Hotpatching chat would reset poll/announcement timers

- A lot of bugs relating to minute/millisecond confusion in timer code

- Poll answers were called `questions` in the source code for some
  reason; they've been renamed to consistently be `answer`.

- Refactor out an extremely unnecessary manual iteration
2020-12-28 08:50:34 -05:00
Annika
6d92ac8547
Repeats: Support non-time-based repeats (#7518) 2020-12-28 03:39:52 -08:00
Mia
2cca8bd48e
Support persisting polls and announcements (#7477) 2020-12-28 01:02:13 -08:00
Mia
f2264c93d4
Throttle how many rooms a user can join at once (#7817)
* Throttle room joining

* OK

* comment & thing

* Update server/chat-commands/moderation.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update server/chat-commands/moderation.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update server/chat-commands/moderation.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-12-26 22:06:31 -08:00
Adam Tran
6702decd95
Add Pivot moves as a /ms category (#7822)
* draft test

* Move search for pivot moves
2020-12-26 21:57:03 -08:00
Annika
9edf0ad456 Modlog: Increase PM timeout to 30 minutes 2020-12-26 20:30:17 -05:00
Annika
ca9ce2f225
Refactor /updateserver (#7836)
Now, `/updateserver` updates both public and private code.

To update only one, use `/updateserver private` or `/updateserver public`.
2020-12-26 07:17:43 -08:00
Mia
ff6a030992
Add a --no-security flag (#7648)
* Add a --no-security flag

* Handle port detection better

* Update server/index.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-12-24 10:11:11 -08:00
SirKira(!Uzumaki)
f35be5b51c
Alias /srgc to /subroomgroupchat (#7824)
* Add a alias for /subroomgroupchat.

* Update room-settings.ts
2020-12-24 10:03:48 -08:00
Mia
f787625e2c
Translations: Properly ignore non-translation directories (#7826)
* Translations: Properly ignore non-translation directories

* use ids
2020-12-24 10:00:48 -08:00
Instruct
5b441c2013
Super Staff Bros 4 (#7793)
Collaborative Project lead by @xInstruct with many contributors.

See the Special Thanks section of https://www.smogon.com/articles/super-staff-bros-4
2020-12-24 11:21:02 -05:00
Mia
981019e148
YouTube: Fix crash in interval (#7831) 2020-12-23 20:35:09 -08:00
Distrib
e8d0a8ec86
Improve /help daily (#7828) 2020-12-23 00:02:30 -08:00
Distrib
236aa0a1df
Hosts: Improve /help ipranges 2020-12-22 15:13:36 -08:00
Guangcong Luo
c13a9c84fb Improve /help poll 2020-12-21 21:26:51 -08:00
Distrib
393abfb056
Polls: Redesign help and add missing command (#7803) 2020-12-21 13:55:47 -08:00
SirKira(!Uzumaki)
542c28edd1
Allow PMing self with /blockpms on (#7811) 2020-12-21 03:47:24 -08:00
Distrib
cdcda7061d
Fix padding in /battlerules (#7825) 2020-12-21 03:42:10 -08:00
TheMezStrikes
ff4fe37f79
Alias /suggest and /suggestion to /suggestions (#7816) 2020-12-21 03:36:36 -08:00
Annika
9a9b06ffc9
Chat: Support specifying priority for chatfilters (#7792) 2020-12-21 03:01:16 -08:00
Mia
e601a5eb1f
Suspect tests: Move functionality out of sim/ (#7769) 2020-12-21 13:32:19 +04:00
Kris Johnson
dbbb89bdc2 Fix help for /renameroom 2020-12-20 12:35:06 -07:00
Mia
c12108fa72
Fix spinlock in /nomarkshared view (#7821) 2020-12-18 13:16:02 -08:00
Annika
42bd7cb8f5 Trivia: Remove deprecated sliceCategory function 2020-12-18 12:56:24 -08:00
Mia
075f96aca7 Fix /usersearch's listed permissions 2020-12-17 19:45:50 -06:00
fart
4e5e8c084b
Autoresponder: Fix bug with Refresh button (#7789)
* Fix Autoresponder Refresh button bug

Currently if you go into ``/autoresponder view`` and choose to view autoresponder Stats, it opens a menu where no date is specified and you can choose a date from there. If, however, you press the Refresh button (where no date is specified), it opens a new page called "view-autoresponder-room-stats-" (note the extra hyphen at the end). This is because the "refresh" function is called (on line 458) with [date], which would equal [""]. This is a truthy value, unlike [] and unlike "". This patch changes the conditional statement to look at the first item in the array's truthfulness - it is either an empty string (falsey) or a non-empty string (truthy) - instead of always being truthy.

* Fix failing test

* Fix failing test

Sorry if this isn't ideal, it's certainly not as elegant as it originally was.

* Update responder.ts

* Update responder.ts

* Update responder.ts
2020-12-16 12:33:38 -08:00
Annika
412ca7d5bb Mastermind: Fix timeout properly 2020-12-15 16:10:46 -08:00
Annika
290d520ea7 Mastermind: Highlight users on round start 2020-12-15 16:10:46 -08:00
Annika
e78fff3d47 Mastermind: Add a command to kick users 2020-12-15 16:10:46 -08:00
Annika
20bda5e548 Mastermind: Take all tied players to finals 2020-12-15 16:10:46 -08:00
Annika
721a48ea38 Trivia: Number submissions from 1 2020-12-15 12:00:10 -08:00
zgeorgecsat
5d4529ebcf
Mafia: Support submitting night actions through script (#7749)
* Allows players to submit idles through script

* Added suggestions

Co-authored-by: Student <Student@MacBook-Air-5.hsd1.il.comcast.net>
2020-12-15 14:45:30 +10:30
Annika
4c1f8bb491 Trivia: Fix bugs with adding questions 2020-12-14 18:48:35 -08:00
Annika
04418fee99 Trivia: Fix bug with Mastermind 2020-12-14 16:20:51 -08:00
Annika
dab1008448 Trivia: Fix bug in /trivia removeleaderboardentry 2020-12-14 15:07:50 -08:00
Annika
7f3afbc74f
Mastermind: Reduce intermission to 0.5 seconds
As per the original doc from Aegii (https://pastebin.pl/view/cf5113e5), which I misunderstood originally.
2020-12-14 14:46:40 -08:00
Annika
f2bfc82ca1
Chat monitor: Improve the handling of usernames (#7786)
* Chat monitor: Improve the handling of usernames

This PR ignores word boundaries in evasion regexes when filtering usernames, preventing the use of usernames with evasions of slurs in them.

* properly fix merge conflicts
2020-12-14 12:55:11 -08:00
Mia
755f930957
Add a page/command for viewing log access logs (#7794) 2020-12-14 01:38:56 -08:00
Annika
d742fbf1e4
Trivia: Use an Object for questions instead of a sorted array (#7800) 2020-12-13 23:17:10 -08:00
Mia
94fe9d838b
Fix userid search regexes for battlesearch/chatlog (#7801) 2020-12-13 23:12:14 -08:00
Annika
b7c3e6cff2 Chat monitor: Add Unicode support to regexes
This should fix the issues with the filter thinking that `🐺ℕ𝕚𝕟𝕖𝕥𝕒𝕝𝕖𝕤-𝔸𝕝𝕠𝕝𝕒🐺` was the T-slur.
2020-12-13 14:51:46 -08:00
Mia
9712f6ecf1
Modlog: Remove Rooms global in PM (#7799) 2020-12-13 12:52:52 -08:00
Mia
14218b133d Youtube: Fix crash in /yt endwatch 2020-12-13 20:12:20 +00:00
Mia
ceb7bfab8b
Battlelog: Run search in PM (#7796) 2020-12-12 13:44:54 -08:00
Guangcong Luo
6ceaed0002 Fix TypeScript error
It seems every other week TypeScript does an update that affects
whether or not this line needs a cast.

This should probably have been refactored to `typeof` ages ago, because
that one way more reliably doesn't need a cast.
2020-12-12 19:44:54 +00:00
Guangcong Luo
50d24998a9 Revert /tour forcepublic text change 2020-12-12 19:44:54 +00:00
Annika
37daf55014
Chatlog: Increase PM timeout to 1 hour 2020-12-11 20:47:09 -08:00
Mia
f9c4f8d4bc
Chatlog: Refactor FS/ripgrep handling and support battle logs (#7775) 2020-12-11 16:51:42 -08:00
Mia
3fb5f20321
Youtube: Track current video time in groupwatch (#7767) 2020-12-11 11:39:23 +04:00
Mia
f2e879320f
Tournaments: Use CommandContext#requireGame (#7778) 2020-12-11 11:35:34 +04:00
Kris Johnson
5df9c77dfc
Prevent /tour forcepublic spamming rooms (#7777) 2020-12-11 11:34:17 +04:00
Guangcong Luo
013851359c Support using avatars from username history
Now you can use `/avatar` for any private avatar you have access to
from your username history, without needing to change name every time.
2020-12-09 23:18:17 +00:00
Guangcong Luo
53c6b9103a Remove #chatfilter from PunishType
PunishType is currently only used for proxy detection markers, which
this should make clearer.

Chatfilters now use the regular punishment system (setting user.locked
to the user ID).
2020-12-09 23:18:17 +00:00
Annika
ab9cb3a825 Battlesearch: Increase PM timeout to 3 hours 2020-12-09 09:14:21 -08:00
Annika
43b5070724 Trivia: Fix bug
THe order of the object keys matters, apparently. Why?
2020-12-08 18:10:59 -08:00
Annika
e0892ba88f Trivia: Support storing up to 5 subcats 2020-12-08 17:47:59 -08:00
mwaitzman
5991c92ec5
README: Delete duplicate paragraph (#7771) 2020-12-07 09:45:43 +04:00
Mia
b7001afdba
Chat: Add a method for iterating commands (#7722) 2020-12-03 19:37:59 -08:00
Annika
65bf84d88f Punishments: Fix bug with checkPunishmentTime
Apparently optional chaining doesn't work in setTimeout callbacks, since Sucrase implements it as its own function.
2020-12-02 23:31:37 -08:00
Annika
c87a4669c5 Properly prevent reuse of forcerenamed names
af36329377 identified the bug, but moved it into the wrong filter. third time's the charm?
2020-12-02 23:26:56 -08:00
Annika
3be2f0674c
Punishments: Fix indentation
fuck github web
2020-12-02 17:54:39 -08:00
Annika
eceb8549dd
Punishments: Fix #hostfilter and #rangelock 2020-12-02 17:38:03 -08:00
PartMan
1c37bc0dea
Make /cover type1/type2 work (#7760) 2020-12-03 03:22:03 +04:00
Annika
59a33fc2d0 Chatmonitor: Improve evasion handling in nicknames
Don't autolock users who use the slur verbatim without attempting to evade
2020-12-01 23:08:40 -08:00
The Immortal
ad1fd0f873 Fix build 2020-12-02 04:40:08 +04:00
Mia
7095ba77c0 Fix another isStaff instance 2020-12-01 12:30:19 -06:00
PartMan
6c8f15fe36
Support /weak Type1/Type2 (#7756) 2020-12-01 09:31:12 -08:00
Mia
b5e66f3177
Users: Properly assign isStaff to staff roomauth (#7757) 2020-12-01 09:30:39 -08:00
Guangcong Luo
54c8c8c24b Fix crash when launching with subrooms 2020-12-01 15:43:09 +00:00
Guangcong Luo
cc1acbb934 Fix build error from merging conflicting PRs 2020-12-01 15:16:02 +00:00
Mia
62f358f1d0
Exclude room-specific commands for other rooms in /permissions (#7679) 2020-12-01 07:07:50 -08:00
Mia
0afd5cb54b
Punishments: Show users a warn message on login for offline warns (#7741) 2020-12-01 07:02:54 -08:00
Mia
95d2fdf746
Moderation: Properly disallow forcerenamed offline names (#7726) 2020-12-01 07:01:42 -08:00
Mia
e942ed1f56
Youtube: Add support for watching videos as a group (#7732) 2020-12-01 06:53:59 -08:00
Kris Johnson
5a573525ad
Translations: Fix strings for the repeats plugin (#7746) 2020-12-01 06:47:13 -08:00
Kris Johnson
fba68d5be6
Reformat old instances of CommandContext/Room#tr (#7744) 2020-12-01 06:31:55 -08:00
Guangcong Luo
2fde654c78
Refactor subroom code (#7721)
This introduces a new function, `setParent`, to handle the details
of setting up subrooms.

`roomid`, `parent`, and `subRooms` are now read-only, so they can't
be accidentally be set directly rather than through their setters
(`rename`, `setParent`, and `clearSubRooms`).

I don't think setters should be used for this, because I think it's
important to be clear that `rename` and `setParent` will change a lot
of other state and induce network activity.
2020-12-01 06:22:44 -08:00
SirKira(!Uzumaki)
fd789cb760
Improve help for !show and /show (#7753) 2020-12-01 06:22:13 -08:00
Mia
186677239d
Nicknamefilter: Support hiding nicks from filters (#7751) 2020-12-01 06:21:17 -08:00
PartMan
e3a93f7578
Add missing </details> (#7755)
Doesn't really matter since it gets automatically added, but doesn't feel right without it. 'o.o
2020-12-01 06:18:38 -08:00
Annika
23aca7383b Modlog: Support debugging the ProcessManager 2020-12-01 01:49:17 -05:00
Annika
bae69612b0
Users: Don't give bots isStaff (#7750) 2020-11-30 12:55:46 -08:00
aQrator
62d96c2210
Scavengers: Expand the functionality of /scav timer (#7740) 2020-11-29 09:10:52 +01:00
Annika
19c992b95b Fix bug with /usersearch sorting 2020-11-28 18:56:17 -08:00
Annika
da83a9bc37 Chatlog: Keep Upper Staff logs secret 2020-11-27 11:24:02 -08:00
Annika
a1b085f033
Chat monitor: Support unit tests (#7710) 2020-11-26 01:33:09 -08:00
Annika
fc049e8d40 Hosts: Remove unused multiline functionality
Also lets us utilize more descriptive modlog entries & private mod actions!
2020-11-25 19:32:41 -08:00
zgeorgecsat
3ec8821083
Mafia: Fix sub and IDEA bugs (#7705)
* Allows players that subbed out or stopped cohosting to be forceadded into the game.

* Upon subbing, players' pages update after the subbed player is removed from the playertable.

* Allows /mafia dt for ideas

* Shift plurality to the subbed in player.

* Fix clear button

* Adds spaces between roles in role list.

* Syntax fixes

* Add info to /mafia dt <idea>

Co-authored-by: Student <Student@MacBook-Air-5.hsd1.il.comcast.net>
2020-11-26 13:12:03 +10:30
Annika
70016c9e49 Admin: Fix /updateserver private 2020-11-25 13:48:31 -08:00
Mia
23615e5ce0
Youtube: Make /show show videos directly in chat (#7725) 2020-11-24 10:14:04 -08:00
MacChaeger
c86c5966d9
/dexsearch: Fix immunity check for Thousand Arrows (#7727)
Unlike /effectiveness and /coverage, /dexsearch doesn't need to support
arbitrary mods, so Thousand Arrows can be hard-coded as the only move to
ignore any immunities.
2020-11-24 10:12:53 -08:00
Mia
38bb9c2ee9
/usersearch: Sort users by offline/online status (#7723) 2020-11-24 08:55:57 -08:00
MacChaeger
3156d039bd
/randombattles: Check Gmax forme for moves (#7724) 2020-11-24 08:46:17 -08:00
Annika
5dacf4a35f
Support automatic expiry for monthlocks (#7715) 2020-11-23 13:12:38 -08:00
Annika
7b9903bc8e
Chatlog: Support room aliases in /linecount (#7652) 2020-11-23 15:12:36 +04:00
Volco
613fd60dd3
Fix disqualifyUser bug in tournaments (#7720) 2020-11-23 02:43:32 -08:00
Annika
ae6c5d994c GroupchatMonitor: Only activate every 10 minutes 2020-11-22 18:04:17 -08:00
MacChaeger
2b4de5d9d5
Fix type immunity check in /ds weak and resists and disallow status moves (#7717) 2020-11-22 00:48:40 -08:00
Annika
18f1806da4 Moderation: Remove unnecessary escape
`message` is never treated as HTML so escaping it just mangles usernames with special characters in them
2020-11-21 12:39:13 -08:00
Annika
90645c1cad Helptickets: Fix typo 2020-11-20 17:32:13 -08:00
Mia
fc3e398d89
Add a command to search usernames (#7714) 2020-11-20 08:26:30 -08:00
MacChaeger
5d71b3a28f
Dexsearch: Support resists move and weak move (#7713) 2020-11-20 00:50:09 -08:00
Annika
34cab27a74
Properly type Promises (#7712) 2020-11-19 23:19:42 -08:00
Annika
2be851fed4
Chat: Remove unnecessary assertion
It looks like the type checker got smart enough to tell that `Array.isArray` ensures that it's a string. This should fix checks.
2020-11-19 19:54:12 -08:00
Annika
3934dec0fa Fix error message when using /ipsearch on a range 2020-11-19 15:14:29 -08:00
Mia
af36329377
Filters: Properly stop forcerenamed names from being used (#7709) 2020-11-19 05:08:22 -08:00
Mia
f4d89b2d54
Helptickets: Mark tickets with offline users separately (#7708) 2020-11-19 04:59:44 -08:00
Mia
34d873e491 SOTD: Properly rename JubilifeTVFilms 2020-11-18 16:46:54 -06:00
Mia
aeb3980b6e Fix build 2020-11-17 19:19:36 -06:00
Mia
c18ea48f97 Thing of the Day: Update TVFilms reference 2020-11-17 19:17:33 -06:00
Guangcong Luo
847681d9e9 Improve /updateserver, /rebuild, /hotpatch UX
My carefully-designed `/updateserver` UX has been ruined by the
addition of the rebuild step.

The new `/updateserver`, `/rebuild`, and `/hotpatch` commands are now
once again as carefully-designed as before, and should represent a
much improved server administration experience.
2020-11-17 10:45:40 +00:00
Guangcong Luo
67ff14e92a Refactor setPrivate 2020-11-17 10:24:16 +00:00
Mia
080ecc7469
Rooms: Merge privacy setting code into setPrivate (#7695) 2020-11-17 02:00:06 -08:00
HoeenHero
73581b814d
Correctly propagate errors in runPromote (#7697) 2020-11-17 01:59:31 -08:00
Mia
88a3c28e27 Monitor: Fix nothrottle typo 2020-11-15 21:18:53 -06:00
Leonard Craft
999c617ae1 UNO: correct typo 2020-11-15 13:05:57 -06:00
Mia
7307364451
Remove /forcehotpatch (#7663)
Hotpatches now always rebuild before patching.
2020-11-14 21:01:35 -08:00
Mia
1e4b4dc0ed
/whois: Only show semilock reasons to global staff (#7691) 2020-11-14 19:46:10 -08:00
TheMezStrikes
a2c1fc9cc8
Update CAP samples link (#7689) 2020-11-12 19:44:18 +04:00
Mia
60bda2795f
CommandContext: Move parseCommand into Chat (#7661) 2020-11-11 19:59:38 -08:00
Mia
0246147e94
Chatlog: Refactor perm checks for gstaff (#7649) 2020-11-11 19:54:17 -08:00
Mia
f03cae8360
Youtube: Update category command permissions (#7668) 2020-11-11 19:41:38 -08:00
Mia
79572fcac4
Settings: Properly make battle rooms public (#7687) 2020-11-11 18:35:31 -08:00
Mia
6f13e3285d
Modlog viewer: Search global modlog when used in adminlog (#7681) 2020-11-11 17:23:47 -08:00
Mia
c6f72a9e85
/sharedbattles: Upload replays of shared battles (#7682) 2020-11-11 17:23:24 -08:00
PartMan
62371e97de
Remove ^ from staff list in /scav top (#7683) 2020-11-11 14:59:11 -08:00
Mia
db7cd135bd
Datasearch: Disallow 'all' search broadcasting in battles (#7686) 2020-11-11 14:37:53 -08:00
Guangcong Luo
ca5822c63c Set context.parse return value back to any
Sadly, there seems to be an issue with the `no-floating-promises`
linter. I'll revisit this later, but for now, this should fix the build
error.
2020-11-11 09:20:12 +00:00
Guangcong Luo
4d98067b8f Don't show tour battles in subrooms list
Fixes #7670
2020-11-11 03:25:07 +00:00
Guangcong Luo
b9a0d3f494 Fix return signature of context.parse 2020-11-11 03:25:06 +00:00
Mia
2cf1562541
Chatlog: Properly format search regexes in result rendering (#7674) 2020-11-10 14:25:12 -08:00
Mia
cf80329b86
The Cafe: Stop holding a reference to the room long-term (#7677) 2020-11-10 14:18:36 -08:00
Mia
a277edf154
Info: Make /rules account for other possible use-cases (#7667) 2020-11-10 14:18:04 -08:00
Mia
b3f549cda2
Chat: Stop sending the message through when a command crashes (#7678) 2020-11-10 14:05:23 -08:00
Guangcong Luo
6d5dcfe948 Fix !pline broadcast limit 2020-11-10 14:55:05 -05:00
Mia
f00e2fa44e
Rooms: Properly rename private battle rooms (#7675) 2020-11-10 10:43:00 -08:00
Mia
20e7ee4556
Helptickets: Use globalModAction for /ht ban (#7664) 2020-11-10 16:18:45 +04:00
Mia
c6437a1dfc
Responder: Add a page to view ignored terms (#7665) 2020-11-09 19:57:23 -08:00
Guangcong Luo
8ce98254c8 Fix vuln in responder 2020-11-09 22:55:20 -05:00
Mia
50522e3f66
Deprecate /showmedia (#7671) 2020-11-09 19:24:12 -08:00
Annika
fceffa6635 Helptickets: Export tickets for easier debugging 2020-11-08 21:03:44 -08:00
Annika
cdba988551 Tournaments: More fixes for subroom handling
Co-authored-by: sirDonovan <quivistis@gmail.com>
2020-11-08 20:40:40 -08:00
Annika
39bc5e6c05 Tournaments: Properly add/remove subrooms 2020-11-08 20:31:35 -08:00
Mia
6145fab828
Allow the Help auto-response filter to be used in all rooms (#7645) 2020-11-08 20:16:25 -08:00
Mia
79cb8a1c35
Moderation: Properly log /hidetext's message (#7659) 2020-11-08 19:02:51 -08:00
Mia
b0c2f03f41
Users: Apply loginfilters to namelocked users (#7662) 2020-11-08 17:26:10 -08:00
Mia
9c2c4efe07
Admin: Warn the user of disabled commands on hotpatch/lockdown (#7660) 2020-11-08 17:25:41 -08:00
Mia
850d4a4b9b
Add a command to disable commands (#7655) 2020-11-08 14:39:20 -08:00
Guangcong Luo
fc0e50e8f9 Fix bug in previous commit 2020-11-08 22:26:55 +00:00
Guangcong Luo
1e39e19f00 Refactor chat to use Utils.splitFirst 2020-11-08 18:31:38 +00:00
Guangcong Luo
e55cead3e4 Document context.parseCommand 2020-11-08 18:31:38 +00:00
Mia
fc80f47b0b
Helptickets: Fix ticketban list html (#7636) 2020-11-07 19:14:08 -08:00
Konrad Borowski
7bcdf130bd
Chatlog: Escape regex when searching for an user (#7656) 2020-11-07 18:19:38 -08:00
Annika
fde82ca866 Punishments: Improve timer duration validation
must. lock. proxies.
2020-11-07 17:14:22 -08:00
Mia
950c74360b
Chatlog: Handle next result buttons properly (#7658) 2020-11-07 14:58:53 -08:00
Konrad Borowski
119b98b593
Chatlog: Automatically determine regex engine (#7657)
This makes ripgrep use PCRE2 for searching logs only when necessary.
2020-11-07 14:32:44 -08:00
Annika
ce6a20aea1 Punishments: Validate timeout durations 2020-11-06 18:17:44 -08:00
Annika
edc53a6fc6 Fix password generation for private battles 2020-11-06 17:43:46 -08:00
Annika
ecd90af23b
Punishments: Make locks expire on their own (#7598) 2020-11-06 15:14:46 -08:00
Annika
e6a61e52aa
Fix renaming battle rooms (#7399) 2020-11-06 15:14:08 -08:00
Annika
059452dc0d
Modlog: Move type signatures into Map constructors 2020-11-06 11:54:16 -08:00
Annika
ec0a92469a Modlog: Make tests work without SQLite 2020-11-05 22:40:53 -08:00
Annika
0a27f398df
Helptickets: Display message in unclaimed tickets (#7647) 2020-11-05 11:09:47 -08:00
Konrad Borowski
32f299584f
Remove hotpatch notifications from Upper Staff (#7646) 2020-11-05 22:56:39 +04:00
Guangcong Luo
9b5217ab70
Split up dex-data into more files (#7634)
* Split up dex-data over individual files

This commit introduces:
- `dex-abilities.ts`
- `dex-conditions.ts`
- `dex-formats.ts`
- `dex-items.ts`
- `dex-moves.ts`
- `dex-species.ts`

These files centralize definitions from `dex-data` and `global-types`.

* Inherit ItemData from Item etc

Previously, Condition inherited from ConditionData. Now, ConditionData
inherits from Condition. The advantage of the new approach is that now,
Condition and DataCondition no longer need to be separate types, and
there should be much less duplication of type definitions in general.

This has also been done for

- ItemData/Item/DataItem
- AbilityData/Ability/DataAbility
- FormatData/Format/DataFormat

Species and DataSpecies was already merged, but this also reverses
their inheritance (saving a lot of duplicated definitions in the
process!)

The only one left is MoveData, which is just super complicated and
will need its own commit.
2020-11-05 05:00:13 -08:00
Mia
938d998da0
Mafia: Allow staff to speak in games (#7642) 2020-11-05 04:57:09 -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
Kris Johnson
acbe53ba4a
Modernize the coding style of the OM chat plugin (#7643) 2020-11-05 04:50:05 -08:00
Konrad Borowski
1a9bfa044a
Require a digit to follow port number in links (#7644) 2020-11-05 04:44:28 -08:00
Annika
56506c1801 Fix blocking room invites
When settings.blockInvites is false or undefined, we should allow room invites to be sent.
However, this code denies it because it thinks that the user sending the message is not of the rank "undefined" (or "false"), which isn't a real rank.
2020-11-04 21:37:57 -08:00
Mia
67ee30f2fd
Introduce Config.noipchecks (#7626) 2020-11-04 15:14:30 -08:00
Mia
8a1919fd0a Chatlog: Update arg handling 2020-11-04 14:24:53 -06:00
Mia
065be6ca78
Topusers: Fix arg handling (#7635) 2020-11-04 23:14:40 +04:00
Konrad Borowski
da24ba9c6e
Consider bots to be staff (#7633) 2020-11-04 05:21:46 -08:00
Annika
202bb7affe Modlog: Properly clean up streams
We don't need a reason to differentiate between whether or not a modlog stream was never initialized or was previously destroyed, and we don't need a Map with 8.2 million keys.
2020-11-03 15:44:57 -08:00
Mia
56501355d7
Support ignoring room invites (#7180) 2020-11-03 10:15:17 -08:00
Leonard Craft III
920af21aac
Abilities: Add isPermanent flag (#7614) 2020-11-03 10:31:11 -05:00
Annika
ee79159a25 Helptickets: Don't make global modlog entries 2020-11-02 21:58:46 -08:00
Annika
aa069ce8fd
Support disabling modlogs (#7619)
Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-11-02 22:59:31 -05:00
Mia
89d127eafd
ProcessManager: Add a static execFile (#7566) 2020-11-02 11:35:07 -08:00
Mia
e2cb3a1f57
Chatlog: Support searching for a user (#7591) 2020-11-02 08:50:58 -08:00
Mia
c0baf2135d
Make /addline broadcastable and rename to /pline (#7621) 2020-11-02 08:47:55 -08:00
Mia
c5907735ef
Tournaments: Start timer in all battles when forcetimer is activated (#7624) 2020-11-02 08:42:33 -08:00
Mia
22a410afea
Support basic text formatting in polls/announcements (#7623) 2020-11-02 08:42:03 -08:00
Mia
cbf4a450da
Add /vsl alias to viewspotlights (#7622) 2020-11-02 08:40:41 -08:00
Annika
3b709ac34f
Fix permission check for /addline 2020-11-01 18:43:02 -08:00
Annika
dab9f570f1 Modlog: Don't write alts if there are no alts 2020-11-01 16:25:36 -08:00
Annika
7f2dec0797
Modlog: Avoid optional properties in ModlogEntry (#7613)
* Modlog: Avoid optional properties in ModlogEntry

* Use a type

* Make IP nullable

* Add NOT NULL constrains

* Fix typo
2020-11-01 14:07:01 -08:00
Kris Johnson
909419ca27 Fix /randbats interaction with Gen 2 sets 2020-11-01 14:23:40 -07:00
Guangcong Luo
db4963e49f Improve "click here" error message 2020-11-01 02:06:24 +00:00
Annika
06535b4235 Modlog: Disallow duplicates in ModlogEntry#alts 2020-10-31 14:13:23 -07:00
Annika
06cbdada99
Don't allow forcerenamed usernames to be reused (#7609) 2020-10-31 05:54:17 -07:00
Distrib
3909191904
Display the announcement whith /announcement (#7612) 2020-10-31 05:52:17 -07:00
Annika
923b69cac6 Trivia: Prevent stalemates in Infinite mode 2020-10-30 18:09:25 -07:00
Annika
58d8a2af70 Fix API for writing to the global modlog 2020-10-30 16:57:29 -07:00
Annika
b9d993495d Modlog: Fix crash in writing global modlog 2020-10-30 16:36:55 -07:00
Annika
2f130e8762
Modlog: Support logging to a SQLite database (#7513)
* Modlog: Support logging to a SQLite database

Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-10-30 19:27:25 -04:00
Annika
84ff0cd90c
Fix permission checks for global promotions 2020-10-30 15:59:40 -07:00
HoeenHero
f158940783
Don't report multiple punishments for a single room (#7606) 2020-10-30 09:51:10 -07:00
Annika
1d9c24c382
Users: Don't merge unregistered names across IPs
Fixes #7594
2020-10-30 08:46:52 -07:00
Annika
1ab6091551 Helptickets: Properly quote and escape button HTML 2020-10-29 19:30:06 -07:00
Annika
7db0505e7b
Moderation: Remove whitespace 2020-10-29 18:11:27 -07:00
Annika
2469dd7c08
Moderation: Actually make groupchatbans hotpatchable 2020-10-29 18:04:18 -07:00
Annika
b6326d7a86 Trivia: Document /trivia move 2020-10-29 15:59:31 -07:00
Marty-D
89050aaefb
Add missing Trainer avatars 2020-10-29 15:22:42 -04:00
Annika
3ed4a34270
ANOTD: Change tagline to quote
Requested by Anime and Manga staff
2020-10-29 12:07:26 -07:00
Kris Johnson
ab6e173e24
Move natures into their own file (#7601) 2020-10-29 08:38:03 -07:00
Mia
251f801210
Studio: Only request YT video data once (#7595) 2020-10-29 08:31:54 -07:00
Mia
6f22b27e15
Ticketbans: Use the user object (#7596) 2020-10-29 08:11:47 -07:00
Mia
458b47cb39
Chatlog: Allow non-trusted secret room ROs to view logs (#7597) 2020-10-29 06:48:55 -07:00
Guangcong Luo
2fd138f82c Reorganize README
The README has been split up so guides for PS's different use-cases are
easier to find.
2020-10-29 13:17:26 +00:00
Annika
efcbc6ce3d
Include groupchat bans in /punishments 2020-10-28 18:59:28 -07:00
Annika
62f1bd14fc Chat plugins: Make viewing source respect /permissions 2020-10-28 16:59:45 -07:00
Mia
c67b745d44
Chatlog: Carry opts over when switching days (#7584) 2020-10-28 16:50:57 -07:00
Annika
0164af53e4
Support banning users from using groupchats (#7558) 2020-10-28 14:12:42 -07:00
PartMan
a4a3e385e8
Fix G-Max moves not showing up in movesearch (#7555)
Happened because G-Max moves had move.isNonstandard as 'Gigantamax'.
2020-10-28 13:02:37 -07:00
Annika
73078447a5
Punishments: Make rangelocks persistent (#7545)
This solves the issue with yearlocks disappearing.
2020-10-28 12:08:52 -07:00
Annika
d4cb0c71c6
Hosts: Support displaying shared IPs (#7568) 2020-10-28 12:08:29 -07:00
Annika
b226a501b3
Helptickets: Add button for the reporter's modlog (#7560)
As per (this suggestion)[https://www.smogon.com/forums/threads/staff-suggestions-bugs.3514540/page-17#post-8634198].
2020-10-28 11:41:12 -07:00
Mia
6f721e31ff
CommandContext: Add a method for getting roomgames (#7531) 2020-10-28 05:20:33 -07:00
Annika
f2a4798bb8
Chatfilters: Fix reasons displaying as undefined (#7579) 2020-10-27 19:44:53 -07:00
Charlie Kobayashi
4272005e42
sendReplyBox: fix interaction with hidelines (#7577) 2020-10-27 19:32:03 -07:00
Annika
a273e53e08
Make /clearstatus log to Staff room (#7557)
`/forcerename` and other global punishments do this
2020-10-27 19:24:09 -07:00
Guangcong Luo
3b4a3ba7e0 Improve custom rule validation
Stray spaces are now consistently allowed in `/tour rules` and
`/challenge`, but are not allowed in `formats.ts`.

Improves #6811
2020-10-28 02:18:52 +00:00
Guangcong Luo
a38f0597f8 Remove last vestiges of tslint 2020-10-27 22:49:00 +00:00
Guangcong Luo
c9759954b9 Remove sim/global-variables.d.ts
The sim no longer uses any global variables, so this can and should be
removed.

`server/global-variables` has also been cleaned up, since I'm working
on this.
2020-10-27 22:03:14 +00:00
Konrad Borowski
6fe378b246
Indicate pending promises in /eval (#7592) 2020-10-27 14:33:04 -07:00
Mia
34db61539e
Youtube: Cache requested video data (#7593) 2020-10-27 14:11:30 -07:00
Mia
d045890884
/show: Throttle requests (#7589) 2020-10-27 23:02:02 +04:00
Mia
2e864524e0
Chatlog: Use new username html tag (#7519) 2020-10-27 08:10:28 -07:00
Mia
6c825ad198
Youtube: Properly check permissions (#7590) 2020-10-27 10:52:29 -04:00
Mia
bdad542eb3
Studio: Handle Net errors better (#7586) 2020-10-26 20:32:33 -07:00
Annika
99dce89cc6
Fix behavior of /faq with no arguments 2020-10-26 14:52:02 -07:00
Mia
f1f6f21fc1
Connections: Track current chat page (#7522) 2020-10-26 14:43:16 -07:00
Annika
c55c741c81
Move server/'s global variables out of index.ts (#7585) 2020-10-26 13:55:51 -07:00
Kris Johnson
bcff2a7902
The Studio: Allow finding recs by artist/user name (#7578) 2020-10-26 06:25:21 +04:00
Kris Johnson
f95bcfc428 The Studio: Fix crash 2020-10-25 20:20:26 -06:00
Quinton Lee
6c6ba3ce45
Battlesearch: fix crash in child processes 2020-10-24 17:50:21 -05:00
Guangcong Luo
e8451f8104 Clean up imports
A lot of our code for child processes doesn't really follow our
original standards. This refactors them back to work the way they
were intended to.
2020-10-24 22:12:35 +01:00
Kris Johnson
57e3d7c185
Add The Studio chat plugin (#7542) 2020-10-24 14:09:43 -07:00
Mia
fb3b6e3886
Move Battlesearch to its own file (#7481) 2020-10-24 10:52:52 -07:00
Annika
bd5d026c43 Fix crash in Punishments#autolock
We should be destroying a user's personal rooms _after_ making a modlog entry.
2020-10-23 15:25:57 -07:00
Annika
97713bad33
Validate timeout durations (#7556) 2020-10-22 13:47:26 -07:00
Annika
61f072f793 Moderation: Improve modlog entry for /rangeban 2020-10-22 21:01:36 +01:00
Annika
dcc9c63433
Support replay URLs in /join (#7526) 2020-10-22 01:57:26 -07:00
Guangcong Luo
e98024f88f Fix bug in toDurationString precision
Fixes #7554
2020-10-21 19:04:06 -04:00
iscke
bbb550bd81
Use new requireRoom API in trivia and scavs (#7553) 2020-10-21 07:56:00 -07:00
Mia
c6aa139f62
Youtube: Persist interval time (#7550) 2020-10-21 05:37:02 -07:00
iscke
99450eba4e
Mafia: Use new requireRoom API (#7552) 2020-10-21 05:27:15 -07:00
Guangcong Luo
d6eeb197c1 Improve Chat.toDurationString
- Default precision is now 3.

  (Instead of "3 months 25 days 17 hours 46 minutes 40 seconds", it'll
	say "3 months 25 days 17 hours". You can still set the precision to
	`Infinity` if you actually prefer that.)

- Now displays "forever" for Infinity or overflow durations

- No longer skips blank precision levels

  (Shows "3 hours 0 minutes 10 seconds" instead of
	"3 hours  10 seconds")
2020-10-21 13:05:08 +01:00
Mia
ef6cad7c9d
CommandContext: Make requireRoom support specifying a room (#7549) 2020-10-21 04:21:42 -07:00
Mia
7da1bdeab9
Remove /roomwhitelist from /roomhelp (#7547) 2020-10-21 03:15:18 -07:00
Mia
5b387aed47
Chatlog: Support viewing log stats for a room (#7514) 2020-10-20 05:52:45 -07:00
Mia
e7cf8a23c9
COTW: Support saving channel data of winning channels (#7535) 2020-10-20 05:48:24 -07:00
Annika
6c60752085 Trivia: Add option for nonrandom question order 2020-10-19 21:37:36 -07:00
Annika
20752cbb54 Trivia: Fix typo 2020-10-19 21:37:36 -07:00
ZardMX
3a4e1b1f47
Make Galar formes show up in /ds (#7447) 2020-10-19 03:19:04 -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
Mia
918d436ac0
Youtube: Move video data fetching to a different function (#7536) 2020-10-19 02:18:44 -07:00
Annika
5118c9edfa
Moderation: Make weekbans override 2-day roombans (#7534)
For consistency with /weeklock
2020-10-19 01:07:40 -07:00
Annika
bca73b19cc
Room events: Add a command to view categories (#7525) 2020-10-19 01:07:05 -07:00
Distrib
36ce1dc872
Add alias for /makegroupchat and /deletegroupchat (#7532)
For https://www.smogon.com/forums/threads/make-mgc-shorthand-for-makegroupchat.3671952/
2020-10-19 01:06:20 -07:00
Annika
fe034ac087
Helptickets: Don't show battles for self-reports (#7520) 2020-10-19 00:57:38 -07:00
Annika
111f1383a9
Modlog: Add weekroomban as a punishment 2020-10-18 12:04:11 -07:00
Annika
c9d62d944e
Chatfilters: Fix wordfilter storage (#7530) 2020-10-17 23:13:28 -07:00
Mia
d020a2f921
Youtube: Support searching for videos (#7529) 2020-10-17 02:52:04 -07:00
Annika
7e188dee1c
Battlesearch: Fix typo 2020-10-16 14:29:53 -07:00
Annika
9aa837b9df
ProcessManager: Support timing out queries (#7502) 2020-10-16 02:56:02 -07:00
Annika
ab93c7a550 Punishments: Fix bug in getRoomPunishments
This fixes the issue with users who got roombanned on multiple IP addresses being autolocked erroneously.
2020-10-15 15:22:50 -07:00
Annika
018105bd10 Helptickets: Escape HTML in common battles 2020-10-14 08:52:52 -07:00
Guangcong Luo
0b0cf3733d Fix toTimestamp type signature 2020-10-13 04:40:38 -07:00
Kris Johnson
52fb644d9e
Update various datasearch commands (#7512) 2020-10-12 15:46:19 +04:00
Annika
2f816d68fb Fix permission checking for room deletion 2020-10-11 17:33:31 -07:00
Kris Johnson
31e2e492a1
Repeats: Don't format until repeating and give raw text in the page (#7505) 2020-10-11 14:35:52 -07:00
Mia
ca3e7237d7
Youtube: Support channel categories (#7509) 2020-10-11 13:44:42 -07:00
Kris Johnson
d9b3a510ad
TextFormatter: Support replacing \n without trusted (#7507) 2020-10-11 13:38:34 -07:00
Annika
ea9170b062
Helptickets: Display common battles in more ticket types (#7510) 2020-10-11 13:27:23 -07:00
PartMan
3c7129cb04
Remove background from /scav queue (#7508) 2020-10-11 17:44:05 +04:00
Guangcong Luo
1c0c77ff6b
Update to TypeScript 4.0 (#7504) 2020-10-10 14:43:32 -07:00
Kris Johnson
5378e39127
Repeats: Support repeating HTML (#7495) 2020-10-09 20:33:39 -07:00
Annika
fc0a16d3cb
Modlog: Fix regex in Modlog#getGlobalPunishments 2020-10-09 18:18:58 -07:00
Annika
7c23f786f8
Modlog viewer: Improve IP handling (#7498)
- prevents non-global roomstaff from seeing IPs in modnotes or legacy modlogs
- makes modnoted IP addresses link to whatismyipaddress.com
2020-10-09 16:04:48 -07:00
Mia
92b77cc459
User groups: Autojoin staff rooms on global promo (#7500) 2020-10-09 16:04:06 -07:00
Mia
e324ba260b
Moderation: Notify Staff for RO promos (#7499) 2020-10-09 15:59:18 -07:00
Mia
01aed88a57
RPS: Improve matchup handling (#7497) 2020-10-09 13:43:47 -07:00
Distrib
b433197e6a
Remove the broadcast cooldown for !showteam (#7486) 2020-10-09 13:25:21 -07:00
Annika
a285c2cf2c
Chat: Propagate promises for loading translations (#7496) 2020-10-09 13:15:50 -07:00
Mia
77079b47b8
RPS: Improve several things (#7492) 2020-10-09 12:38:34 -07:00
Annika
b24c44c9b6 Trivia: Support category aliases 2020-10-09 12:37:16 -07:00
Annika
a3b83ba50b
Translations: Convert JSON to TypeScript (#7493) 2020-10-09 12:03:44 -07:00
Guangcong Luo
bfb5c874a4 Repeat: Limit interval to 24 hours
(Bug found by xfix)
2020-10-09 14:58:06 -04:00
Annika
79fe2ac7df
Trivia: Fix typo 2020-10-08 22:37:45 -07:00
Annika
969cde2e35 Datasearch: Limit arguments to 300 characters 2020-10-08 19:55:14 -07:00
Annika
f7eb0c9eae Datasearch: Use CommandContext#checkChat 2020-10-08 19:46:58 -07:00
Mia
fb23fc8733
/showteam: Properly handle nick/form names (#7489) 2020-10-08 13:31:29 -07:00
PartMan
d37b9486d7
Allow Pokemon names as arguments in /stone (#7490) 2020-10-08 19:20:27 +04:00
Kris Johnson
b107236dc5
Repeats: Refactor storing and deleting repeats, let people repeat room FAQs (#7488) 2020-10-07 23:42:30 -07:00
Annika
2698153e7c
Quotes: Use readmore blocks for long quotes (#7465) 2020-10-07 11:28:39 -07:00
Mia
ffeb0413bf
Helpfilter: Fix crash in suggestions (#7409) 2020-10-06 17:07:20 -07:00
Mia
fd28553e2c
Support playing Rock Paper Scissors (#7445) 2020-10-06 16:17:34 -07:00
Mia
896793c010
Youtube: Update channel url handling (#7482) 2020-10-06 16:00:16 -07:00
Mia
4279d1f3bc
Update attributions in various locations (#7354) 2020-10-06 15:55:26 -07:00
Mia
4620068159
Chat commands: make /addrankuhtml multiline (#7480) 2020-10-06 15:23:14 -07:00
Mia
a975f623a4
Chatlog: Add more opts (#7479) 2020-10-06 15:21:57 -07:00
Annika
2660741e9a
Fix /help for room promotion commands (#7478) 2020-10-06 15:18:55 -07:00
Mia
01c3e0e3ef
Add a command to view the registration time of a user (#7366) 2020-10-06 11:47:12 -07:00
Leonard Craft III
789d892098
Chat#checkHTML: Ban <iframe> tags (#7476) 2020-10-06 11:16:04 -07:00
Mia
13aa1d44cd
Battlesearch: Make turn limit optional (#7468) 2020-10-06 10:40:20 -07:00
Annika
df791e9f7d
Trivia: Don't allow locked/muted users to play
Requested by Trivia staff.
2020-10-06 10:17:35 -07:00
Mia
e2e8daa885
Thing of the Day: apply filters to noms (#7466) 2020-10-06 09:34:42 -07:00
Annika
216e4a7354
Add a plugin to repeat phrases in chatrooms (#7338) 2020-10-05 14:25:18 -07:00
asgdf
8eb9a40263
Add more letter substitutions to filter (#7470) 2020-10-05 14:23:39 -07:00
PartMan
fa5456deca
Make !groups case-insensitive (#7475) 2020-10-05 14:22:20 -07:00
Mia
fe5ef07f0c
Chatlog: Notify the user that a search is running (#7474) 2020-10-05 13:55:28 -07:00
Annika
7eabc7635c
Remove trailing whitespace
I thought I had set up my editor to do this but apparently not.... my bad.
2020-10-05 09:20:22 -07:00
Annika
dc77ad160a
Helptickets: Display common battles more cleanly 2020-10-05 09:06:52 -07:00
Quinton Lee
0094f34e38
Chat: fix CommandContext#filter in PMs
The ChatFilter type already specifies room as `Room | null` so this check should not be needed.
2020-10-04 13:22:57 -05:00
Guangcong Luo
177b2c4af2 Fix tour autostart
Fixes #7469
2020-10-03 21:49:38 -07:00
Annika
3fcb8f4e00
Use attributes of CommandContext in Chat.filter (#7461) 2020-10-03 21:30:20 -07:00
Annika
f4dee3c7f9
Modlog: Fix bug with punishments with no reasons
Fixes https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/page-32#post-8613159.
2020-10-03 15:25:33 -07:00
Mia
4d8580df97
Rooms: Refactor Modlog import (#7463) 2020-10-03 09:56:40 -07:00
aQrator
d0b19629dd
Scavengers: Improve /edithunt (#7456)
Two minor changes for the Scavengers plugin:

- Change the ``/`` for alts to a ``;`` to allow easier copying
- Change the edithunt method to allow commas in the answers
2020-10-03 09:55:49 -07:00
Mia
aba5dd1119
/showteam: Support nicknames (#7464) 2020-10-03 08:25:14 -07:00
Annika
aeaa05bd5a Modlog: Minor fixes
yes another modlog commit from me!
this time, it's making sure that note searches based on user IDs actually get toID() called on them, and fixing some HTML escaping issues
2020-10-02 20:59:42 -07:00
Mia
ab16b48d48
Chatlog: Update permission checks (#7459) 2020-10-02 19:26:29 -07:00
Annika
d807e00e40
Helptickets: Display shared battles in staffintro (#7460) 2020-10-02 19:24:29 -07:00
Annika
3db02d9b7d Trivia: Restrict random mode selection
Random mode should not select First mode if it was played in the past 10 Trivia games
2020-10-02 16:04:41 -07:00
Annika
0dd6e1c0d4
Modlog viewer: Fix formatting of search explanation 2020-10-02 10:00:50 -07:00
Annika
53cebdc09d
Daily spotlights: Add alias for /viewspotlights (#7453) 2020-10-01 15:46:24 -07:00
Guangcong Luo
65db20711c Fix bug in /updateserver 2020-10-01 11:58:14 -07:00
Jeremy Tan Jie Rui
6e956aee51
Add documentation on maxgen parameter to /ds (#7451) 2020-10-01 09:40:17 -07:00
Mia
3e92bcd2cc
Quotes: Remove the broadcast cooldown for /randquote (#7450) 2020-10-01 09:39:54 -07:00
Annika
0cf43e7461
Modlog: Default to searching all fields (#7449) 2020-10-01 09:36:36 -07:00
Guangcong Luo
523c1a335d
Introduce Chat.oldPlugins (#7434)
This provides a new way to persist chat plugin data across hotpatches:
`Chat.oldPlugins`.

In a plugin, you can now do:

```
export const cache = Chat.oldPlugins.pluginname?.cache || {};
```

to create a cache that will persist across hotpatches.
2020-09-30 19:45:54 -07:00
Annika
0877f0ae1e
Modlog: Fix entries with an IP address and no user (#7446) 2020-09-30 17:55:41 -07:00
Annika
1c4b57b56c
Use translated German website pages (#7440) 2020-09-30 12:32:56 -07:00
Annika
fa571d3b4b
Modlog viewer: Update regex for /ml roomid, search (#7444) 2020-09-30 12:32:15 -07:00
Annika
212b35b2fa
Modlog: Support exact user searches (#7443) 2020-09-30 11:22:49 -07:00
Annika
e24ec79b92
Fix room promotion messages 2020-09-30 11:13:25 -07:00
Annika
5bad212da8
Apply chatfilters to !code (#7442) 2020-09-30 10:32:27 -07:00
Annika
98b9bd69b1 Fix more modlog attributions 2020-09-29 17:39:28 -07:00
Guangcong Luo
3d68248efa Update to latest eslint
We're skipping two major typescript-eslint versions, so there are a
bunch of changes here, including:

- it's catching a lot of things it didn't catch in the past, for
  reasons unclear to me

- no-unused-vars has to be explicitly disabled in global-types now

- a lot of `ts-ignore`s were never necessary and have been fixed

- Crashlogger can now handle being thrown things that aren't errors.
  This has never been a problem in the past, but to satisfy TypeScript
	we might as well not die in a fire on the off chance someone tries to
	`throw null` or something.
2020-09-29 15:28:08 -07:00
Guangcong Luo
2bcea34447 Support ./pokemon-showdown simulate-battle -S
simulate-battle now has a new option: --spectate.

As a recap:

-D --debug: simulate in debug mode

-R --replay: output only the omniscient (debug) replay, rather than the
  full stream

-S --spectate: output only the spectator replay, rather than the full
  stream
2020-09-29 15:28:07 -07:00
Mia
b7630b70cf
Chatlog: Handle ErrorMessage properly (#7438) 2020-09-29 14:30:50 -07:00
Kris Johnson
8d080ff320
UNO: Fix timestamp and switch to Chat.ErrorMessage (#7437) 2020-09-29 08:53:21 -07:00
Annika
cdd6a4ce31 Moderation: Save replays for offline warns 2020-09-28 22:10:17 -07:00
Mia
a9645d29f1 Modlog: fix defaulting to roomid in /modlog 2020-09-28 18:04:57 -05:00
Mia
1eb2c77208
Modlog viewer: Improve UI (#7436) 2020-09-28 16:01:05 -07:00
Annika
b3a5f9e59f
Moderation: Refactor room promotions to a function (#7426) 2020-09-28 15:49:26 -07:00
Annika
6e2a336975 Don't duplicate attributions in modlog entries 2020-09-28 15:26:30 -07:00
Annika
c2861c2411 Chat: Fix CommandContext#globalModlog 2020-09-28 15:22:25 -07:00
Annika
f2ef093493
Modlog: Parse entries in the child process (#7435) 2020-09-28 12:04:06 -07:00
Charlie Kobayashi
493bd033c7
Scavengers: Add October twist (#7433) 2020-09-28 11:21:36 -07:00
Annika
f1b4e3d43a
Modlog: Refactor to use ModlogEntry objects (#7403) 2020-09-28 11:06:30 -07:00
Annika
1a9293e2cf
Make /yearlock write to the global modlog (#7431) 2020-09-28 10:23:40 -07:00
Guangcong Luo
a7c902328f
Refactor staffAutojoin (#7429)
`room.settings.autojoin` and `room.settings.staffAutojoin` are now
merged.

Staff autojoin rooms are now simply regular autojoin rooms with a
modjoin setting. You simply autojoin all autojoin modjoin rooms that
you're allowed to join.

Fixes #7413
2020-09-27 17:47:15 -07:00
Annika
3b3bbd583d Add 'roomprizewinner' to the room permissions list
This will allow `/permissions` to set the required rank to promote to Prize Winner, just as with other room groups.
2020-09-27 16:35:09 -07:00
The Immortal
b67701d8a4
Add suspect tests plugin (#7427) 2020-09-27 15:41:04 -07:00
Annika
b865fe537c
Trivia: Fix Mastermind (#7419) 2020-09-27 13:03:06 -07:00
Guangcong Luo
9fe45238f5
Introduce chunk readers for ReadStream (#7215)
This adds new functions `stream.byChunk(bytes)`, `stream.byLine()` etc
which parse a `ReadStream` into an `ObjectReadStream<string>` which
can then be consumed with for-await.

Fixes #7195
2020-09-27 08:55:59 -07:00
PartMan
6cb31fe2a6
Fix Flooring in /statcalc (#7420) 2020-09-27 06:56:58 -07:00
Mia
f7288df665 Fix build 2020-09-26 23:27:51 -05:00
Mia
62bcce1d55 Plugins: Don't try-catch ENOENT errors when using FS.readIfExists() 2020-09-26 23:02:45 -05:00
Charlie Kobayashi
4be093ec56
Fix injection issue in /makegroupchat (#7424) 2020-09-26 20:30:57 -07:00
Charlie Kobayashi
eee5e5fa63
Quotes: escape some HTML (#7425) 2020-09-26 20:29:32 -07:00
Annika
1c5a8086b5
Check username length in /forceroompromote 2020-09-26 12:58:33 -07:00
Mia
78933408bf
Quotes: Move to a chat plugin (#7421) 2020-09-26 08:11:42 -07:00
Mia
3352e11b86
Add the alias /profile to /whois (#7422) 2020-09-26 02:28:11 -07:00
Mia
b9df40c5af
Auth: Fix whitelist/prizewinner giving trusted status (#7418) 2020-09-25 08:58:31 -07:00
Marcell
d2bb6a8089
Make Prize Winner bold (#7416)
I removed the "/" from the first tag, so it will be displayed as bold.
2020-09-25 00:28:08 +04:00
Annika
2e6ed8a50f
Helptickets: Fix double notification (#7415)
We should only be sending notifications through Staff room rather than the page.
2020-09-25 00:17:14 +04:00
Annika
1f239664c7
IPTools: Check proxy IPs before other host types (#7414) 2020-09-24 09:30:47 -07:00
Annika
eb2261b846
Helptickets: Close a user's ticket on global ban (#7411) 2020-09-22 21:00:38 -07:00
Kris Johnson
5a8ded0568
Room FAQs: Convert the rfaq list to a page (#7394) 2020-09-22 19:30:05 -07:00
Mia
7a89492947
Chatlog: Use ProcessManager for searches (#7393) 2020-09-22 18:23:01 -07:00
Mia
8bbec3db3a
Add prize winner to /groups (#7407) 2020-09-22 18:18:52 -07:00
Annika
db5d04c2c9
Make modnotes global in rooms with shared modlogs (#7401)
This mainly applies to modnotes in help tickets and battles, as well as global staff modnoting in groupchats (in case of misbehavior in a groupchat).
2020-09-20 20:15:42 -07:00
Annika
1e20f6a96f
Trivia: Add leaderboard management commands (#7402) 2020-09-20 16:33:03 -07:00
Annika
4a61ffd5ac
Trivia: Use Room#subGame for Mastermind (#7371) 2020-09-19 18:32:44 -07:00
urkerab
fbef450802
Fix missing variable renames after PR #6670 (#7400) 2020-09-19 17:59:40 -07:00
Mia
2db1922e87
Battlesearch: Improve phrasing and UI (#7396) 2020-09-19 16:22:15 -07:00
Mia
fdd264d075
Quotes: Properly check if a user can view the room (#7397) 2020-09-19 16:03:00 -07:00
Guangcong Luo
360668b00e Revert "Fix renaming battle rooms (#7326)"
(It had a bug that made private battles unplayable.)

This reverts commit 930c00410b.
2020-09-19 05:36:34 -04:00
Annika
930c00410b
Fix renaming battle rooms (#7326) 2020-09-19 02:05:27 -07:00
Mia
ae7a46dd37
Chat: Move forcerename tracking to Monitor and Punishments (#7381) 2020-09-19 02:04:49 -07:00
Guangcong Luo
46c470671a
Unify /guess (#7387) 2020-09-19 01:24:52 -07:00
Annika
480079e790
Punishmentfilter: Don't activate for permalocks (#7389) 2020-09-19 01:23:21 -07:00
Annika
62a2eda1a1
RoomGame: Support room.subGame (#7380) 2020-09-19 00:40:24 -07:00
Annika
59ba8aa876
Chat filters: Support custom redtext (#7392) 2020-09-18 20:38:53 -07:00
Annika
ab7daeecf8
Mention PHP in /opensource (#7391) 2020-09-18 20:37:57 -07:00
Mia
9a555a6ee9
Add weekban to /punishments (#7388) 2020-09-18 16:19:43 -07:00
Annika
6d8d0bd93a
Trivia: Use Chat.ErrorMessage more (#7384) 2020-09-18 16:19:26 -07:00
Mia
6f28e459f3
Battlesearch: Support searching for multiple users and searching months (#7382) 2020-09-18 07:44:33 -07:00
Mia
6255927779
Add a command to highlight users in bot html pages (#7304) 2020-09-18 07:38:44 -07:00
Quinton Lee
bf400c4ef1
Restore global bot permissions for /filters list (#7385) 2020-09-18 05:08:51 -07:00
Annika
66ba5a25b2
Remove Idle status on logging in (#7383) 2020-09-18 03:58:23 -07:00
Kris Johnson
d7adf0e17c
Quotes: Make deleting quotes log properly 2020-09-17 20:36:51 -06:00
Annika
c143c879e1 Fix bugs when promoting a user with authed alts 2020-09-17 17:20:47 -07:00
Annika
33e59f16af Punishments: Fix modlog entries for autolocks 2020-09-17 10:40:44 -07:00
Mia
e80f71f648
Chat: Fix Context.checkChat (#7327) 2020-09-16 18:41:30 -07:00
Annika
c7934184cf
Fix hardcode in /modjoin sync (#7377) 2020-09-16 18:40:14 -07:00
Annika
357131ec68
Escape regexes in the filter display page
Lookbehind regexes cause problems....
2020-09-16 15:36:08 -07:00
Kris Johnson
dd494bb973
Tournaments: Modernize permission checking (#7375) 2020-09-16 03:40:15 -07:00
Mia
abad806760
Improve the /faq command (#7369) 2020-09-16 01:25:34 -07:00
Annika
ba4bb2f120
Helptickets: Display user language and remove prefix (#7373) 2020-09-16 01:21:07 -07:00
Annika
12c7a08424 Improve group symbol validation in /permissions
This fixes the issues where you can set permissions to a rank that doesn't exist
2020-09-16 00:20:28 -07:00
Annika
38d62612f4
Move checkChat() in /invite (#7374) 2020-09-15 23:31:03 -07:00
Annika
88558b6ac6
Chat: Always make help commands broadcastable 2020-09-15 16:37:33 -07:00
Kris Johnson
df9a4488fa
Quotes: Quality-of-life changes and bug fixes (#7361) 2020-09-15 03:32:08 -07:00
Kris Johnson
bbccd2e2f4
Tournaments: Fix permissions (#7370) 2020-09-15 03:27:26 -07:00
Annika
466dfcc5ce Trivia: Fix start officials 2020-09-14 18:06:57 -07:00
Mia
041d8fb0ed
Helptickets: Refactor bans to use the punishment interface (#7365) 2020-09-14 17:02:57 -07:00
Annika
f248b838b6
Allow groupchat hosts to rename their groupchats (#7359) 2020-09-14 16:34:41 -07:00
Leonard Craft III
302d6ff6fb
Add hidestats arg to showteam and improve output (#7357) 2020-09-14 16:33:34 -07:00
Annika
52c5df12d5
Fix crash in /invite (#7364) 2020-09-14 16:28:22 -07:00
Mia
96b4c4c841
Searchlogs: Don't require a room (#7367) 2020-09-14 16:27:26 -07:00
Annika
422649dca7
Trivia: Add a new game called Mastermind (#7368) 2020-09-14 16:03:50 -07:00
Mia
6aa55bd6b1
Tournaments: Refactor commands (#7229) 2020-09-14 02:09:30 -07:00
Guangcong Luo
db449796c9 Document collapseLineBreaksHTML 2020-09-14 01:43:37 -07:00
Annika
87ea9bb431
Add a filter to run code after global punishments (#7362) 2020-09-12 22:33:56 -07:00
Mia
8be5ccb235
Quotes: Fix bug in attribution (#7360) 2020-09-12 19:45:56 -07:00
whales
3cae09feab Mafia: Fix forcehost 2020-09-13 12:14:49 +09:30
Annika
e47abc6d57
Modlog: Fix crash in renaming temporary rooms 2020-09-12 17:11:50 -07:00
Kris Johnson
b7b609a205 Display BST properly in /crossevo and /showevo 2020-09-11 18:53:08 -06:00
Annika
71bdfe6c0b
Fix bug in room promotions without a user object
We don't use `splitTarget` anymore here, so this prevented the command from working when no user object was found
2020-09-11 14:49:11 -07:00
Mia
e1b91066c3
Support adding quotes in rooms (#7352) 2020-09-11 13:44:14 -07:00
Mia
aa9c36ca62
Thing of the Day: Fix bug in removing users (#7353) 2020-09-11 12:54:56 -07:00
Annika
8542aa91a1
Re-add /cs as an alias for /clearstatus
I accidentally removed this in https://github.com/smogon/pokemon-showdown/commit/0a26579af.
2020-09-11 10:51:09 -07:00
whales
89d1d1a9cf Mafia: Fix broadcasting queue 2020-09-12 00:52:08 +09:30
Annika
52aa7ece1e Fix Room Prize Winner rank 2020-09-10 19:22:51 -07:00
Annika
2c6bd4aa5d
Chat plugins: Export plugin state (#7351) 2020-09-10 19:17:00 -07:00
Mia
23f0c6be74
Helpticket list: Respect ignoring tickets (#7345) 2020-09-10 17:26:31 -07:00
Annika
28b8532940
Support promoting multiple users at once in rooms (#7344) 2020-09-10 15:13:41 -07:00
TheMezStrikes
497d746f26
Don't ban autoclose tags without spaces from html (#7341) 2020-09-10 13:36:13 -07:00
Mia
4e4aa2764a
Update AnnotateCommands regexes to account for refactors (#7349) 2020-09-10 13:35:54 -07:00
Mia
852858a7a0
Help: Fix issue with approvals (#7347) 2020-09-10 13:35:16 -07:00
Annika
34ec6ebb56
Help chatfilter: Add closing </code> tag in help (#7346) 2020-09-09 17:58:21 -07:00
Annika
1b9e334cd9
Fix visual bug with /hiderank in PMs (#7334) 2020-09-08 00:17:49 -07:00
whalemer
1511fcb821
Mafia: Update permissions (#7324) 2020-09-08 12:25:25 +09:30
Annika
471fe7365a
Add "η" to the evasion filter (#7330)
See https://replay.pokemonshowdown.com/gen8nationaldex-1182878993 for an example of how this can be used to evade.
2020-09-07 12:49:11 -07:00
Guangcong Luo
9b705936b0 Very ugly workaround for /me checkChat bug
There are too many conflicts to revert, so this will have to do for now.
2020-09-06 22:35:28 -04:00
Guangcong Luo
e543cb843f Revert "Improve privacy for hidden battles (#7281)"
It wasn't implemented in `user.games` and a few other places, leading to bugs.

This reverts commit 222d2e1ac9.
2020-09-06 22:15:55 -04:00
Annika
222d2e1ac9
Improve privacy for hidden battles (#7281)
Co-authored-by: Kirk Scheibelhut <kjs@google.com>
2020-09-06 18:46:35 -07:00
Annika
64165b556b
PunishmentMonitor: Include punishments on alts (#7322) 2020-09-06 17:53:49 -07:00
Annika
8789d619f6
Chatfilters: Spoiler autolocking banwords (#7295) 2020-09-06 17:53:33 -07:00
Annika
0a26579afa
Make core commands translatable (#7279) 2020-09-06 17:49:53 -07:00
Annika
52cfaa999b
Trivia: Add short alias for casesensitivesearch (#7325) 2020-09-06 15:05:32 -07:00
whalemer
f5bdef7b4b
Auth: Fix changing a group's permission for commands (#7323) 2020-09-06 12:29:22 -07:00
Mia
44fc0123ad
Chat: Refactor CommandContext and PageContext to use ErrorMessage more (#7234) 2020-09-06 00:15:16 -07:00
Annika
df04c24a91
Weekban: Fix error message and add /wb alias (#7319) 2020-09-05 20:59:27 -07:00
Annika
f4081991d3
Modlog viewer: Fix more button for shared modlogs (#7320) 2020-09-05 20:44:40 -07:00
Mia
8f8e197d9c
Helptickets: Stop modlogging to Help room (#7070) 2020-09-05 18:25:20 -07:00
Mia
4f3c5c8581
Permissions: Support setting permissions for all sub-commands at once (#7164) 2020-09-05 17:40:11 -07:00
Annika
1a987c00bf
Trivia: Support specifying case sensitivity in searches (#7316)
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
2020-09-05 17:32:40 -07:00
Annika
13d1a4fa6d
Allow users to see their own hidden games in /whois (#7315) 2020-09-05 13:57:54 -07:00
Annika
83e8262d12
Users: Fix bug with IP handling (#7305) 2020-09-05 08:18:42 -07:00
Annika
08818294a8
Log viewer: Escape usernames (#7309) 2020-09-05 08:16:29 -07:00
Mia
7222b7280b
Support week roombans (#7311) 2020-09-05 08:13:21 -07:00
Guangcong Luo
acb851f857 Add a new command: /yearlockip
/yearlockip works like /lockip, but lasts for a year. It's intended to
be used to punish users who troll over a long term, but from a static
IP.

I've also separated strings out in a way that should make them slightly
easier to translate in the future.
2020-09-04 21:16:25 -07:00
Mia
6b671e9526
Searchlogs: Improve handling of date not found errors (#7308) 2020-09-03 17:52:20 -07:00
Mia
73e5284db3
Searchlogs: Fix crash in date parsing (#7307) 2020-09-03 17:24:47 -07:00
Lusamine
19355641f0
Remove Anubis from Credits (#7306) 2020-09-03 17:06:54 -07:00
Kirk Scheibelhut
afdbcd355e Update credits 2020-09-03 13:29:41 -07:00
HoeenHero
6dab83d6c4 Remove unneeded canTalk check
mia asked me to push this since keeping this check will result
in a ghost message if a match is found.
2020-09-02 23:29:57 -04:00
Guangcong Luo
1217457b06 Fix /updateserver
This adds a bunch of minor fixes to /updateserver. The big one is that
we no longer stash untracked files, which should fix the problem where
it sometimes takes forever to update.

However, it seems like conflicting untracked files sometimes corrupts
the Git system?

    zarel@cytosine ~/W/psserver (master)> git rebase FETCH_HEAD
    Created autostash: abc06bdca
    First, rewinding head to replay your work on top of it...
    error: The following untracked working tree files would be overwritten by checkout:
        server/chat-plugins/help.ts
    Please move or remove them before you switch branches.
    Aborting
    fatal: Could not detach HEAD

    zarel@cytosine ~/W/psserver (master|AM/REBASE)> git rebase --abort
    error: could not read '.git/rebase-apply/head-name': No such file or directory

I couldn't reliably reproduce this, unfortunately, but I've switched to
`git rebase --no-autostash FETCH_HEAD` to be safe. File conflicts
are really rare in general, so I don't think that needs to be a
blocker.
2020-09-02 20:14:07 -07:00
Annika
c5833d637a
Thing of the Day: Fix crash (#7301) 2020-09-02 21:35:31 -04:00
Mia
3a8bd28a6f
Help: Fix vulnerabilities (#7300) 2020-09-02 21:31:37 -04:00
Annika
8bc416730e
Trivia: Reformat help and don't use module.exports (#7292) 2020-09-02 12:07:24 -07:00
Annika
94a6f14e48
Remove trusted user check in /hidetext (#7282) 2020-09-02 09:51:05 -07:00
TheMezStrikes
94b3e6f96f
Update CAP samples link to gen 8 (#7288) 2020-09-01 02:26:30 +04:00
Mia
2e5bd14bbe
Help: Disable if a room is not configured (#7287) 2020-08-31 16:21:28 -04:00
Mia
42ba4b87d2
Youtube: Fix crash (#7280) 2020-08-31 06:45:35 -07:00
Annika
1cbab7162c
Filter Pokémon nicknames after team validation (#7283)
This will prevent the staff room from getting spammed when people do things like nickname their Pokémon 10,000 n-slurs in a row.
2020-08-31 06:21:58 -07:00
Mia
9a0f1ed11e
Fix regex replacing (#7265) 2020-08-31 06:19:04 -07:00
Mia
1d450461e2
Chat: Show the full command in nonexistent errors (#7286) 2020-08-31 04:13:47 -07:00
Annika
c9fa3fc389
Refactor User#prevNames and User#ips to arrays (#7267) 2020-08-29 10:27:03 -07:00
Mia
a8e8604967
Help: Fix crash with approvals (#7275) 2020-08-29 00:02:31 -07:00
Annika
dec6599f77
Fix /unlockip (#7276) 2020-08-28 19:43:58 -07:00
Mia
a68b1fc31d
Help: Fix HTML error in regex page (#7268) 2020-08-27 00:00:24 -07:00
Annika
bece58ee93
Fixes for /unrangelock (#7266) 2020-08-26 22:48:00 -07:00
Annika
9d57cc096b
Use the room language to translate mod actions (#7261) 2020-08-26 09:05:34 -07:00
Annika
00a12e0355
Fix /unlockip's interaction with namelocks (#7252) 2020-08-26 08:19:24 -07:00
Annika
3f000fced2
Do it this way (#7251) 2020-08-26 08:15:55 -07:00
Charlie Kobayashi
0828d91deb
Scavengers: fix display bugs (#7232) 2020-08-26 07:51:12 -07:00
Annika
33e8da3c13
Properly inform client of statusType changes (#7262)
This should fix the bug where usernames remain grey on the client after reloading.
2020-08-26 07:49:05 -07:00
Annika
46d389c3b4
Chat: Make translations not crash on hotpatch (#7263) 2020-08-26 07:48:30 -07:00
Annika
d65335f415
Improve handling of locks when users are merged (#7264) 2020-08-26 04:34:44 -07:00
Annika
30214cfedd
Chat: Make pages translatable (#7258) 2020-08-26 03:34:56 -07:00
Mia
f2a8e4c28b
Help: Allow regular users to suggest regexes (#7260) 2020-08-26 02:20:57 -07:00
ayiadvance
dc0a52db13
Add reveal option and fix forceresetroles for mafia (#6695) 2020-08-26 18:13:56 +09:30
Annika
6931e59df7
Improve Pokémon nickname filter and autolocks (#7253) 2020-08-23 20:41:51 -07:00
Annika
5df47bb388
Allow staff to partially bypass the status filter (#7213) 2020-08-23 04:28:10 -07:00
Kirk Scheibelhut
b20155878b
/hiderank should default to hiding as reg (#7249) 2020-08-23 04:25:40 -07:00
Guangcong Luo
ba4998350a Fix more bugs in /hiderank 2020-08-22 16:03:10 -07:00
Guangcong Luo
91a86df155 Fix /hiderank 2020-08-22 07:47:36 -07:00
Guangcong Luo
e14485656f Implement a basic /hiderank
This doesn't really have any nice-to-have automatic restoration
features but it should be all the important parts.

`user.group` no longer exists, and has been replaced with
`user.tempGroup`, which now applies both to temporary promotions of
unregistered users, as well as temporary hidden ranks of auth.
2020-08-22 07:20:26 -07:00
Guangcong Luo
2878793964 Revert accidental merge of /hiderank code
`/hiderank` code was accidentally merged into #7078

This fully backs out its code.
2020-08-22 06:57:24 -07:00
Annika
3ef50d8feb
Move forced public prefix logic to RoomBattle (#7244) 2020-08-22 05:29:51 -07:00
Annika
ff1cb70a95
Handle evasion filters in Pokémon nicknames (#7246) 2020-08-22 01:26:07 -07:00
Annika
2b8268aabe
Make /updateserver private exit if no updates (#7242) 2020-08-21 15:38:50 -07:00
Annika
dc005c5255
Daily spotlights: Prevent crash (#7245)
The crashes in the daily spotlight plugin were caused by `/queuedailyat` leaving an empty daily that can't be parsed before failing. This should solve it, but some rooms' spotlight data may still cause crashes. (These rooms should use `/removedaily`.)
2020-08-21 15:16:03 -07:00
Guangcong Luo
8d79bf9725 Rename Dex.deepClone to Utils.deepClone
`this.dex.deepClone` still exists as an alias to `Utils.deepClone` for
use in `data/`. I'll need to spend more time figuring out the correct
solution there.
2020-08-21 04:24:34 -07:00
Mia
2561764bdc
Make /requestshow approvals staffintro look nicer (#7233) 2020-08-20 21:35:05 -07:00
Annika
a3c579c3c4
Fix crash in /updateserver private (#7236) 2020-08-20 21:29:57 -07:00
Annika
27d4212771
Display whitelist correctly in demotion messages (#7238) 2020-08-20 21:18:09 -07:00
fart
b9ced489cd
Show staff intro + pending requests on autojoin (#7228)
At the moment, the staff intro and pending requests only appear on manual joins, not on autojoin. This is because `user.can('mute', null, this)` results false when it is run since the user is not yet logged in. This change creates a new method for generating the staff intro that is run after the user is fully logged in. It also modifies the original `getIntroMessage` so that the staff intro and pending requests still appear on manual joins.

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-08-20 21:17:02 -07:00
Spandan Punwatkar
7f0450673d
Add support for inverse in /weak (#7198) 2020-08-19 13:04:28 -07:00
Annika
8de5027703
Fix HTML tag in /faq (#7230) 2020-08-19 00:46:03 -07:00
fart
d03c6dc435
Fix HTML error with pending media requests (#7227)
This was an extraneous </div> tag which resulted in only the first pending media request to show inside of the <details> tag.
2020-08-19 00:33:45 -07:00
Annika
44d369ca8a
Allow users to set their own language and translate helptickets (#7220) 2020-08-19 00:21:51 -07:00
Annika
fe2f77c5fe
Improvements to the /dnd command (#7196) 2020-08-18 16:56:51 -07:00
PartMan
86e8a9159e
Slight HTML Button Improvements (#7217)
Changes this makes:
a) Lets people use `/pm` or `/w` instead of `/msg` in buttons.
b) Permits the author of the HTML to direct messages towards themselves via buttons (useful for when Bots creates subroomgroupchats and become *, or if they suddenly want hugs from random people).

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
2020-08-18 13:56:03 -07:00
Annika
05065dbdb8
IPTools: Support wildcards in string ranges (#7223) 2020-08-18 13:37:58 -07:00
Mia
d8ecdb5f83
Help: Only write state when relevant to the room (#7207) 2020-08-18 13:06:52 -07:00
Annika
58c5a43e8d
Only allow the player who set modjoin to change it (#7216) 2020-08-18 12:54:22 -07:00
Guangcong Luo
0ca4ed2839 Improve private command support
Private commands can now use `this.privatelyCan` instead of `this.can`
to automatically display "command not found" in the command
(and in Help) for permission failure. They can also use
`this.commandDoesNotExist` to explicitly invoke the error message.

I'm not merging #7141 because I wrote basically all of the code
in this commit, and future blames should go to me if something here
is wrong.

Closes #7141

    Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
2020-08-16 13:21:07 -07:00
Mia
0f12d8232c
Show error when using ! on a non-broadcastable command (#7209) 2020-08-16 11:27:06 -07:00
Annika
3197a53b53
Make the !faq command translatable (#7149) 2020-08-16 11:26:29 -07:00
Annika
49e9d8adda
Display G-Max moves properly in /details (#7117) 2020-08-15 17:57:27 -07:00
Annika
c00e66b76d
Datasearch: Support excluding monotype Pokemon (#7214) 2020-08-15 15:44:46 -07:00
Guangcong Luo
18948c8c2c Refactor ObjectReadStreams to use for-await
Regular ReadStreams still can't; I now believe they shouldn't have a
"default" read method, and you should explicitly choose whether you
want to read "by chunks as they become available", "by chunks of a
specific line" or "by a delimiter".

So you would specifically use `stream.byLine()` or
`stream.byChunk([size])`, which would return an
`ObjectReadStream<string>`.

Inspired by #7195
2020-08-15 15:11:53 -07:00
Annika
4cbf905ec8
Modlog: Fix exact searches and improve hotpatching (#7211) 2020-08-15 14:10:46 -07:00
Annika
0ce6613219
Fix modlog crash (#7200) 2020-08-13 17:07:57 -07:00
Kirk Scheibelhut
0bf366c181
Fix getBattles skip behavior wrt private rooms (#7204) 2020-08-12 16:41:52 -07:00
Kris Johnson
7fc3cd516e
Add /nomarkshared (#7201) 2020-08-12 16:21:00 -07:00
Mia
fa7a0025e5
/showteam: Fix bugs (#7206) 2020-08-12 16:12:45 -07:00
Annika
fc99159589
Punishments: Make autolocks last a week on users with bad records (#7074) 2020-08-12 12:06:45 -07:00
Kris Johnson
5e255012bc
Add a 'bst' property to Species (#7138) 2020-08-12 12:06:09 -07:00
Stephen Middleton
33e6783d04
Wifi: Change Lottery winner logic (#6970)
After a Policy decision within Wi-Fi Staff, it's been decided to update the
Lottery Giveaway to still pick winners when there are less than maxWinners,
but people entered. This will allow low entry GA's to overestimate and still
have winners.
2020-08-12 10:03:39 -07:00
Annika
7df8ad12a9
Hosts: Fix bug with /ipranges widen (#7202) 2020-08-12 10:03:08 -07:00
Kris Johnson
8ba03fa10b
Fix crash with /dt (#7199) 2020-08-12 08:34:04 -07:00
DieterReinert
47e780ef2c
Poll: missing < in opening tag (#7194) 2020-08-10 16:30:59 +04:00
Annika
2b809f99e4
Support updating private code in /updateserver (#7183) 2020-08-09 20:24:32 -07:00
Annika
814567c6e6
Roomsettings: Fix bug with single-command permissions (#7181)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-08-09 12:08:18 -07:00
Guangcong Luo
a315c93836 Switch to using import type
We were previously using `type Foo = import('bar').Foo` which works
actually equally well, because sucrase didn't support `import type`,
but now it does!
2020-08-09 08:07:00 -05:00
Annika
1c5f989837
Datasearch: Allow all-only searches if sorted (#7182) 2020-08-08 01:11:46 -07:00
Mia
7faf35f2a4
Support opting in/out of blocking pms/chals with /busy (#7179) 2020-08-08 00:28:30 -07:00
Annika
ce8a1dd975
IPTools: Remove '-nohost' suffix and make minor improvements (#7108) 2020-08-07 14:47:18 -07:00
Annika
e47461da6d
Trivia: Fix translation formatting (#7175) 2020-08-07 11:39:18 -07:00
Annika
4318d7c9bc
Fix modlog formatting (#7173) 2020-08-07 11:17:34 -07:00
Annika
1fa74d9868
Fix Auth#isAuthLevel (#7174)
Also prevents setting mod(chat|join) below regular user.
2020-08-07 11:05:18 -07:00
Mia
deeed6c789
Remove sim/ and data/'s globals (#7091) 2020-08-07 06:44:15 -07:00
Annika
e00f122b5c
Fix BasicRoom#tr (#7166) 2020-08-06 19:31:38 -07:00
Guangcong Luo
ec93b354bc Fix PM support
(Broken by parseCommand refactor)
2020-08-06 22:21:48 -04:00
Annika
d25fa3c16d
Fix bug in /permissions (#7168) 2020-08-06 19:13:11 -07:00
Annika
f563252418
Modlog: Fix bugs and support hotpatching (#7163) 2020-08-06 22:05:13 -04:00
Mia
83e094bd37
Redesign /permissions help (#7146) 2020-08-06 10:06:02 -07:00
Mia
00526bb604
Help messagefilter: fix crash (#7158) 2020-08-06 10:05:03 -07:00
Lusamine
0f56db1853
Remove extra parentheses from 2 other privateModAction (#7162) 2020-08-06 10:04:36 -07:00
Peach
bfb993e3b2
Fix crash message formatting (#7160) 2020-08-06 09:55:45 -07:00
Guangcong Luo
873efe91ce Refactor extractRoom to requireRoom
New in PageContext as of 9b3a986ef4ef7:

`extractRoom` no longer shows an error message if the room isn't found.
Instead, `requireRoom` does that.
2020-08-06 00:54:02 -07:00
Kris Johnson
f96ec4fb05
Add strict types to tiers (#7135) 2020-08-06 00:41:42 -07:00
Annika
f34ffa9e74
Refactor Modlog into one file (#7127) 2020-08-06 00:39:37 -07:00
Mia
fd0f83ff8d
Add a command to show the user's team in battles (#7068) 2020-08-06 00:36:43 -07:00
Mia
fbe5d90dd0
Youtube: Add tests (#7081) 2020-08-06 00:34:18 -07:00
Guangcong Luo
54027d62bd
Support custom ladders (#6541)
This allows formats to specify a different ladder than their own, for
their rated battles to go on.
2020-08-06 00:28:53 -07:00
Guangcong Luo
9b3a986ef4 Refactor PageContext
Now shows a better error for not-found pages.
2020-08-06 00:25:21 -07:00
Annika
8287cbc7fb
Remove User#authAtLeast and add more sysop bypasses (#7046) 2020-08-06 00:12:30 -07:00
Annika
7f3e55deb9
Improve help message formatting for /searchlogs (#7136) 2020-08-05 23:47:08 -07:00
Mia
647d5af76f
Add a filter for auto-answering questions in the Help room (#7100) 2020-08-05 23:44:46 -07:00
Annika
42451ff430
Trivia: Make strings translatable (#7156) 2020-08-05 23:23:35 -07:00
Annika
3572df1a0c
Fix demoting locked users (#7151) 2020-08-05 20:21:57 -07:00
Annika
ae11a699a6
Add a BasicRoom#tr method (#7143) 2020-08-05 19:14:41 -07:00
Annika
04961fcbb8
Add short alias for /sharedbattles (#7150)
This was requested in Staff room a few days back but I forgot about it until now.
2020-08-05 04:32:55 -07:00
Kris Johnson
8c22d4ce97
Add /flipped command (#7139) 2020-08-05 05:40:31 +04:00
Mia
47d00bf912
Support per-command permissions for sub-commands (#7142) 2020-08-04 03:01:17 -07:00
Guangcong Luo
80c669641a Refactor context.splitCommand
It no longer has side effects, which should make it easier to use for
other use cases.
2020-08-04 02:54:21 -07:00
Mia
fbfd31e1cf
Support configuring when crashes are private (#7122) 2020-08-04 02:18:57 -07:00
Annika
92552da849
Helptickets: Always respect ignoreTickets (#7144) 2020-08-04 01:32:39 -07:00
Mia
50127f6a7a
Make !commands hidetextable (#7137) 2020-08-03 19:34:35 -07:00
Annika
2171032134
Room Settings: Don't display ' ' as a modchat option (#7129) 2020-08-02 17:02:51 -07:00
Mia
b9c9addfdb
Searchlog: Fix crash (#7121) 2020-08-02 16:35:07 -07:00
Volco
26e2a1c4d4
Fix renaming groupchats and groupchat creation (#7123) 2020-08-02 16:21:49 -07:00
Annika
ee67a41184
Fix crash in Announcements (#7126) 2020-08-02 16:10:50 -07:00
Leonard Craft III
d93501949e
Fix /lottery participants from escaping container (#7116) 2020-08-01 22:54:15 -07:00
Mia
71099df544
Fix /renamegroupchat's permission checking (#7101) 2020-08-01 18:15:34 -07:00
Annika
6b1a53ae95
Trivia: Add Infinite length (#7114) 2020-08-01 17:06:50 -07:00
Annika
1b52e51ae0
Polls: Make strings translatable (#7110) 2020-08-01 16:51:41 -07:00
Peach
27513b7ff1
Fix chat commands typing (#7106) 2020-08-01 16:05:27 -07:00
Mia
eef5686ae0
Room-Battle: Improve API (#7083) 2020-08-01 16:04:39 -07:00
Charlie Kobayashi
448c9cbcee
Scavengers: general improvements (#7105)
- Add new command to directly stuff a hunt back into the queue
- Better queue response
- Fix extra spaces in teamscav team names
- Get rid of some old code tidbits that were neccessary when roomlogs were still bork
2020-07-31 18:34:47 -07:00
Spandan Punwatkar
fdea3aca28
Add /battlerules (#7029) 2020-07-31 18:06:19 -07:00
Mia
2a9015457d
Chatlog: Improve search (#6955) 2020-07-31 18:00:54 -07:00
Charlie Kobayashi
69cf80ed2a
Make broadcastBuffer an array (#7103)
This removes any extra unnecessary newlines at the end of each message sent to each client, and will always handle all messages assigned to the buffer properly.
2020-07-31 17:57:19 -07:00
Annika
f472b6c123
Announcements: Make strings translateable (#7102) 2020-07-31 17:00:37 -07:00
Guangcong Luo
7d95f68d26 Fix message corruption
Fixes #7099
2020-07-31 16:39:35 -07:00
Quinton Lee
a8b3da922a
Allow bots to use !checkchallenges again (#7098) 2020-07-31 14:44:57 -07:00
Annika
f25fc4c344
Trivia: Display question numbers (#7097) 2020-07-31 14:39:23 -07:00
Guangcong Luo
c39be07d23 Fix crash messages not appearing in Upper Staff 2020-07-30 17:17:04 -07:00
Guangcong Luo
b4de66c8b9 Remove mistakenly-added /hiderank command
It was accidentally included in #7078 but is actually part of #7058
and crashes without the other changes.
2020-07-30 17:35:32 -04:00
Annika
05a9f9a1e5
Minor code quality improvements based on LGTM (#7092) 2020-07-30 14:24:37 -07:00
Mia
29afa9f454
Fix RO rank displaying (#7090) 2020-07-30 13:17:46 -07:00
Annika
a1ce0cdce1
Moderation: Add /clearaltstext (#7086) 2020-07-30 00:35:30 -07:00
Peach
9cdee242f1
Fix Config error reporting (#7080) 2020-07-30 00:35:13 -07:00
Annika
24c4f2ca55
Moderation: Support private reasons in /warn (#7050) 2020-07-30 00:00:47 -07:00
Annika
d8e7fb4692
Add short alias for /hidebattlesfromtrainercard (#7085)
This was requested and makes sense to me, since it's quite a long command to type out each time.
2020-07-29 23:59:31 -07:00
Annika
cd85cd7a9d
Hosts & IPTools: Refactor to remove hardcoded ranges (#7078) 2020-07-29 23:04:50 -07:00
Kris Johnson
70edfaa64c
Add support for more OMs (#7084) 2020-07-30 05:22:21 +04:00
Guangcong Luo
328ba42a12 Change onChatMessage API to use void return
onChatMessage previously took `string | false`, where `false` means
"let the message through". This is a reversal of what `false` usually
means, so this is now updated to `string | void`, which should be
much clearer.
2020-07-29 15:01:04 -07:00
Annika
74a22d0402
Correctly display reveal button for /cleartext (#7082) 2020-07-29 14:21:42 -07:00
Peach
b4a6cd325b
Don't hardcrash when loading config (#7079) 2020-07-29 01:23:58 -07:00
Guangcong Luo
fe2eb27860
Refactor ip and modchat permissions (#7076)
- `ip` and `ipself` are now separate permissions. This means that `ip`
  is now a generalized permission for viewing IPs (no more need to use
  `globalban`, since `ipself` now controls the ability to see your own
  IP address)

- `alts` and `altsself` are now also separate (all users used to be
  able to `altsself`).

- `modchat`, `modchatall`, and `manageroom` are now just one `modchat`
  permission whose jurisdiction controls how high you can set modchat.
2020-07-29 00:38:52 -07:00
Guangcong Luo
add3a5d9f0 Fix bug when hidetexting own text 2020-07-29 00:37:18 -07:00
Mia
94fff9d496
Support customizing permissions per-room (#6883) 2020-07-29 00:22:03 -07:00
Mia
7216c493bb
Support renaming groupchats (#6965) 2020-07-29 00:21:24 -07:00
Peach
d87eeb4e2c
Don't modnote twice on joining a helpticket (#7049) 2020-07-29 00:17:24 -07:00
Annika
2da0317a71
Implement a /cleartext command (#7065) 2020-07-29 00:16:30 -07:00
Annika
fc764aa8e2
Support requiring high-rated users to register (#7073) 2020-07-29 00:16:02 -07:00
Guangcong Luo
3931f680c3 Improve assertion error message
There's no longer a need to assume that corrupt assertions are
assertions from 2013, rather than some other code mistake.

Inspired by #7064
2020-07-28 17:10:05 -07:00
Guangcong Luo
98b5956d93 Linkify TextMonitor roomids 2020-07-28 20:08:27 -04:00
Mia
b0103c029d
/hidetext: Don't highlight the user (#7071) 2020-07-27 16:19:48 -07:00
Annika
c16750741a
Fix hotpatching IPTools and multiline patterns for Hosts (#7069) 2020-07-27 01:51:28 -07:00
Annika
3a3af89054
Display join/leave messages for locked players (#7066) 2020-07-26 16:03:28 -07:00
Annika
1bb3ed1531
Trivia: Show creator in /trivia history (#7067) 2020-07-26 15:34:12 -07:00
Annika
e0c18e8e0b
Refactor IPTools and add a host management chat plugin (#7061) 2020-07-26 12:41:27 -07:00
Peach
f2bfe2538c
Make sendhtmlpage perms more strict, refactor perm checks (#7044) 2020-07-25 23:31:28 -07:00
Annika
c5ebc2683c
Add a help message for /chatlog (#7063) 2020-07-25 21:32:26 -07:00
Annika
74e13815af
Modlog: Mark room tournaments in modlog (#7062) 2020-07-25 21:32:01 -07:00
Guangcong Luo
b5591fdccf Fix crash in /sendhtmlpage 2020-07-25 19:09:41 -04:00
Kirk Scheibelhut
25eca28c30 Extract singleIPOpenProxies into a Set 2020-07-24 21:03:53 -07:00
Guangcong Luo
c08a1a3199 Fix drivers not having mod powers in battles
Battles are now considered personal rooms, and so
`globalGroupInPersonalRoom` now applies to them properly.
2020-07-24 18:51:38 -07:00
HoeenHero
86043a504a
Add a command to enable hotpatching (#7056) 2020-07-24 17:42:06 -07:00
Annika
7248e6f87c
Helptickets: Fix grammar and add text about appealing locks (#7055) 2020-07-24 15:59:58 -07:00
Guangcong Luo
2f805c93a2
Remove "Battle" prefix from data exports (#7039)
`BattlePokedex` is now `Pokedex`, `BattleItems` is now `Items`, etc.

I also renamed `Movedex` to `Moves` and `Statuses` to `Conditions`.

`TypeChart` isn't `Types` yet, because unlike the others, it's not
indexed by ID. That should probably be fixed one day.
2020-07-24 12:42:26 -07:00
Mia
5ca45205db
Add a throttle for pending challenges (#7045) 2020-07-24 12:04:29 -07:00
Guangcong Luo
fdd90c4225 Properly fix roomwhitelist promotion/demotion 2020-07-24 14:21:13 -04:00
Guangcong Luo
64b12ae58e Fix permission inheritance
Previously, group config inheritance inherited everything, including
obviously wrong things like `name`. This commit fixes it so only
permissions are inherited.

In particular, this means that `globalGroupInPersonalRoom` is not
inherited, finally solving that particular bug although I'm still
not sure what made it originally work correctly and what changed.

Fixes #7043
2020-07-24 11:19:45 -07:00
Mia
63819e8d1c
Make /sendhtmlpage send to the last active connection (#7051) 2020-07-24 10:59:53 -07:00
Peach
be2deb2372
Link IPs in modlog (#7048) 2020-07-24 10:47:43 -07:00
Mia
126a740b2a
Fix chat-commands.js mention in /hotpatch's help (#7047) 2020-07-24 10:46:54 -07:00
Annika
7e7620d301
Send information about locked users in /cmd userdetails (#7041) 2020-07-24 10:12:39 -07:00
Annika
528045a03f
Support hiding battles from /cmd userdetails (#7040) 2020-07-23 21:30:30 -07:00
Guangcong Luo
a42cdf25ff Fix unwhitelisting users 2020-07-23 18:53:39 -04:00
Guangcong Luo
a1e748c121 Fix bug in /renameroom notifications
They would not have actually worked.
2020-07-23 14:20:58 -07:00
Kris Johnson
00b88b521d
Handle Gigantamaxing properly (#7001) 2020-07-23 13:27:42 -07:00
Annika
a11753de7a
Trivia: Support pausing and resuming games (#7038) 2020-07-23 12:59:14 -07:00
Guangcong Luo
b53faf1768 Fix /sendhtmlpage 2020-07-23 12:54:01 -07:00
Mia
964f4f8d06
Add a command for bots to send HTML pages (#6934) 2020-07-23 12:05:45 -07:00
Annika
7375ab4d90
Add cooldown for unregistered namechanges (#7032) 2020-07-23 00:00:29 -07:00
Kris Johnson
31d62a77d8
UNO: Fix typo (#7035) 2020-07-22 23:58:07 -07:00
Peach
e9611b7ce2
Remove unnecessary references to the global room (#7033) 2020-07-22 08:52:46 -07:00
Annika
960d7a927f
Fix bug in destroyPersonalRooms() (#7031)
This will actually destroy groupchats when a user is locked/globally banned, which to my understanding is the intended behavior.
`continue`ing when a room isn't persistent makes no sense, since groupchats are by definition not persistent.
2020-07-21 21:24:50 -07:00
Annika
570df13186
Support renaming battles (#7015) 2020-07-18 21:27:24 -07:00
Kris Johnson
77e4a8ad6f
Add type and category support for <psicon> (#6983) 2020-07-18 18:05:19 -07:00
Guangcong Luo
7d7db34c1d Support Chat.ErrorMessage in async commands
Fixes #7018
2020-07-18 16:33:22 -07:00
Lusamine
3a2ca90040
Minor cleanup of global demotion messages (#7011) 2020-07-17 01:17:36 -07:00
Nol
b5ada89a74
Wi-Fi: Update Giveaway Message (#7004)
* Wi-Fi: Update Giveaway Message

* Remove Enter
2020-07-14 22:17:07 +02:00