Commit Graph

38 Commits

Author SHA1 Message Date
Alexander B
3a15cf814e
Spotlights: Fix "Refresh" button opening another tab (#8684) 2022-03-10 15:59:39 -08:00
Hisuian Zoroark
fa89d9da9a
Spotlights: Don't give an image parameter in source if no image was used (#8615) 2022-01-09 14:46:25 -08:00
Mia
c32ae39df3
Spotlights: Fix typo 2021-09-16 07:44:07 -05:00
Mia
bb468391bb Spotlights: Don't sort stored spotlight arrays 2021-09-07 09:49:39 -05:00
Mia
80ffd2a7b3 Spotlights: Support sorting spotlights by most recent updates 2021-09-02 16:03:25 -05:00
Mia
a06b8e62d1 Spotlights: Broadcast removal of dailies to roomstaff 2021-09-01 12:18:24 -05:00
Mia
11ab3d83f8 Spotlights: Automatically refresh pages on spotlight change 2021-09-01 12:16:55 -05:00
Mia
7811795344
Handle new TypeScript version (#8449)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-08-30 20:11:44 -07:00
Mia
5b4e2fe172 Spotlights: Check /setdaily permissions for viewing source instead of /daily
https://www.smogon.com/forums/threads/let-drivers-see-sourcecode-for-dailies-when-doing-daily.3687106/#post-8905412
2021-07-02 20:26:10 -05:00
Mia
197fe7b6b8 Spotlights: Add a refresh button to the dailies page
https://www.smogon.com/forums/threads/add-a-refresh-button-to-the-daily-spotlights-page.3686101/#post-8886206
2021-06-13 13:10:52 -05:00
Mia
7ae21cebf8
Chat: Support exporting custom handlers from plugins (#8319) 2021-05-28 23:13:01 -07:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07: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
Annika
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00
Mia
98ea14dce3
Spotlights: Store image data (#7978) 2021-02-01 16:37:17 -08:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Distrib
0ab6bcb80a
Daily spotlight: Display raw text in /daily (#7947) 2021-01-25 08:59:39 -08:00
Distrib
e8d0a8ec86
Improve /help daily (#7828) 2020-12-23 00:02:30 -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
Mia
cbf4a450da
Add /vsl alias to viewspotlights (#7622) 2020-11-02 08:40:41 -08:00
Kris Johnson
d9b3a510ad
TextFormatter: Support replacing \n without trusted (#7507) 2020-10-11 13:38:34 -07:00
Annika
53cebdc09d
Daily spotlights: Add alias for /viewspotlights (#7453) 2020-10-01 15:46:24 -07:00
Mia
44fc0123ad
Chat: Refactor CommandContext and PageContext to use ErrorMessage more (#7234) 2020-09-06 00:15:16 -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
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
Annika
2c24650cf7
Daily spotlight: Fix regex to allow whitespace (#6985) 2020-07-09 05:00:22 -07:00
Annika
d2a61a2b9d
Daily spotlights: Add queue management commands (#6974) 2020-07-07 16:14:50 -07:00
Mia
4997a47314
Commands: Allow the room parameter to be null (#6948)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-07-05 14:25:09 -07:00
Guangcong Luo
46c9afa2f3
"Remove" the global room (#6885)
I couldn't completely remove the global room in one commit, but this
solves basically every problem with it by making it no longer a `Room`.

In particular, this means:

- It's no longer of type `Room`
- It's no longer in the `Rooms.rooms` table
- Its class name is now `GlobalRoomState` rather than `GlobalRoom`
- It no longer tracks its own user list (online user count is now
  provided by `Users.onlineCount`)
- It's no longer a socket channel (there's new syntax for "send this
  message to every user")
2020-07-02 11:31:34 -07:00
Guangcong Luo
ba53a2831c Fix bugs in /show
- Chat.getImageDimensions and Chat.fitImage now throw if passed things
  that aren't image URLs.
- Fix help message if you use /show by itself
- Link to full aize image if image is shrunk
2020-06-17 21:11:52 -04:00
Mia
15fed24b40
Refactor auth and room.settings (#6777)
This implements two big changes:

- All settings shared between `room.chatRoomData` and `room` have been
  merged into `room.settings` (so, for instance, `room.slowchat` is now
  only `room.settings.slowchat`).

  This makes it so we never have to worry about them getting "out of
  sync".

  - Checking to see if a room is persistent is now `if (room.persist)`
    instead of `if (room.chatRoomData)`

  - `Rooms.global.writeChatRoomData()` is now rarely called directly;
    there's a new `room.saveSettings()` which will handle it for you.

  - All properties of `room.settings` are now optional (except
    `title`).

- There's a new file `user-groups.ts` which handles authority.

  - `room.auth` and `Users.globalAuth` are now
    `Auth extends Map<ID, GroupSymbol>` objects.

  - `room.auth` is now always defined, removing the need for
    `room.auth?.[userid]` workarounds.

  - A lot of code relating to usergroups and permission checks have
    been refactored.

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-06-09 08:22:25 -07:00
Annika
f4863a9444
Update references to Global Administrators post-flattening (#6815)
Co-authored-by: Charlie Kobayashi <sparkychildcharlie@gmail.com>
2020-06-08 09:41:03 -07:00
Guangcong Luo
b21c9047e2
Migrate to typescript-eslint (#6342) 2020-03-05 08:33:06 -08:00
Kris Johnson
e64e083e6c
Typescript The Cafe (#6379) 2020-02-20 23:01:20 -08:00
HoeenHero
3dcc7d21cc Handle empty/non-existant files when loading 2020-02-19 21:18:10 -05:00
HoeenHero
65bb9635c2 Fix importing of various chat-plugin's data 2020-02-19 21:03:30 -05:00
Kris Johnson
2ea84725e2
Typescript Daily Spotlight, RoomFAQs, and Wi-Fi (#6373) 2020-02-18 13:26:44 -08:00