Commit Graph

1719 Commits

Author SHA1 Message Date
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