Commit Graph

116 Commits

Author SHA1 Message Date
Mia
d3182793b3 Room-settings: Ensure only admins can use /secretroom 2022-03-25 14:48:00 -05:00
Alexander B
03b7e40595
Fix /modjoin restrictions in battles (#8674) 2022-02-23 18:06:06 -08:00
Mia
55413847d0 Roomsettings: Display high traffic correctly in /hightraffic 2022-02-08 20:36:34 -06:00
Mia
a7d27dde3a Add help for all commands in server/chat-commands/ 2021-09-23 12:11:55 -05:00
Mia
60998a00c9 Update /help automodchat 2021-09-18 11:58:21 -05:00
Mia
c912e3bd45 Roomsettings: Fix /modjoin sync
This fixes https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/post-8710045. This changes /modjoin sync so that (if there's no modchat set)  instead of looking for the lowest staff group (in order to set modchat), it looks for the lowest (non reg/whitelist) group that the user can set it to instead. Previously, it looked for the lowest group with the mute permission - bot, which regular users cannot set modchat to in battles.
2021-09-15 19:19:42 -05:00
Karthik
5db9d39756
Support default format for randbats commands (#8367) 2021-06-22 12:06:02 -07:00
Mia
7c1be296e6 Roomsettings: Don't allow locked users to set modchat
People are spamming with this. See comment for why it's not in the other access denied check.
2021-05-12 13:26:39 -05:00
Kris Johnson
5056f86c86 Add help for /roomspotlight 2021-05-07 12:51:48 -06:00
Guangcong Luo
9abbe47531
Support setting a default format/mod for commands in rooms (#8237) 2021-04-27 15:38:51 -07:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Guangcong Luo
7336b22540 Fix support for spotlight rooms 2021-04-24 02:46:45 -04:00
Mia
7154920b2c
Support forcing modchat on ladder tour battles (#8214) 2021-04-23 22:40:09 -07:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -07:00
Mia
9a1df4241d /permissions: Put single command permissions into a readmore
Requested change
2021-04-21 09:03:47 -05:00
Mia
fdb1d4b762 Chat: Properly allow banwording new spoiler formatting 2021-04-15 10:33:41 -05:00
Mia
b7680c783d
Add infrastructure to rename chat plugin data with rooms (#8153) 2021-04-01 01:23:01 -04:00
Annika
4cf03154e9
Don't allow setting modchat above one's rank (#8130) 2021-03-22 15:49:56 -07: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
Annika
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00
Kris Johnson
82b20aaf8e
Use /msgroom in more places (#8042) 2021-02-16 20:10:05 -08:00
Guangcong Luo
e1ac274b5a Deprecate /ioo 2021-02-15 05:56:44 -05: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
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Mia
a63fb0074a
CommandContext: Add a method for refreshing html pages (#7666) 2021-01-28 12:10:50 -08:00
Mia
db92804541
Support automodchat when all roomstaff are offline (#7810) 2021-01-28 11:14:55 -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
4c69e581fc
Prevent non-trusted users creating groupchats (#7927) 2021-01-19 13:35:15 -08:00
Mia
8c27482c88
Permissions: Fix bug in adding namespaces (#7903) 2021-01-11 15:34:39 -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
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
Kris Johnson
dbbb89bdc2 Fix help for /renameroom 2020-12-20 12:35:06 -07: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
Mia
080ecc7469
Rooms: Merge privacy setting code into setPrivate (#7695) 2020-11-17 02:00:06 -08:00
Mia
60bda2795f
CommandContext: Move parseCommand into Chat (#7661) 2020-11-11 19:59:38 -08:00
Mia
79572fcac4
Settings: Properly make battle rooms public (#7687) 2020-11-11 18:35:31 -08:00
Guangcong Luo
b9a0d3f494 Fix return signature of context.parse 2020-11-11 03:25:06 +00:00
Mia
50522e3f66
Deprecate /showmedia (#7671) 2020-11-09 19:24:12 -08:00
Annika
e6a61e52aa
Fix renaming battle rooms (#7399) 2020-11-06 15:14:08 -08:00
Annika
62f1bd14fc Chat plugins: Make viewing source respect /permissions 2020-10-28 16:59:45 -07:00
Annika
0164af53e4
Support banning users from using groupchats (#7558) 2020-10-28 14:12:42 -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
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
2f816d68fb Fix permission checking for room deletion 2020-10-11 17:33:31 -07:00
Charlie Kobayashi
4be093ec56
Fix injection issue in /makegroupchat (#7424) 2020-09-26 20:30:57 -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
Annika
c7934184cf
Fix hardcode in /modjoin sync (#7377) 2020-09-16 18:40:14 -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