Commit Graph

28 Commits

Author SHA1 Message Date
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Distrib
334df4a744
Announcements: Fix /announcement htmlcreate (#8194) 2021-04-13 14:00:48 -07:00
Kris Johnson
2e4eaf97e7 Announcements: Mark formatted text as trusted 2021-03-23 12:47:40 -06:00
Distrib
27f103fd67
Announcements: Don't re-display on hotpatch (#7999) 2021-02-07 04:43:38 +04:00
Kris Johnson
081326b69c
Refactor minor activities (#7766) 2021-01-28 12:12:54 -08: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
Mia
2cca8bd48e
Support persisting polls and announcements (#7477) 2020-12-28 01:02:13 -08:00
Kris Johnson
fba68d5be6
Reformat old instances of CommandContext/Room#tr (#7744) 2020-12-01 06:31:55 -08:00
Mia
22a410afea
Support basic text formatting in polls/announcements (#7623) 2020-11-02 08:42:03 -08:00
Distrib
3909191904
Display the announcement whith /announcement (#7612) 2020-10-31 05:52:17 -07:00
Annika
97713bad33
Validate timeout durations (#7556) 2020-10-22 13:47:26 -07:00
Annika
3fcb8f4e00
Use attributes of CommandContext in Chat.filter (#7461) 2020-10-03 21:30:20 -07:00
Annika
98b9bd69b1 Fix more modlog attributions 2020-09-29 17:39:28 -07:00
Mia
44fc0123ad
Chat: Refactor CommandContext and PageContext to use ErrorMessage more (#7234) 2020-09-06 00:15:16 -07:00
Annika
9d57cc096b
Use the room language to translate mod actions (#7261) 2020-08-26 09:05:34 -07:00
Annika
ae11a699a6
Add a BasicRoom#tr method (#7143) 2020-08-05 19:14:41 -07:00
Annika
ee67a41184
Fix crash in Announcements (#7126) 2020-08-02 16:10:50 -07:00
Annika
f472b6c123
Announcements: Make strings translateable (#7102) 2020-07-31 17:00:37 -07:00
Lusamine
3a2ca90040
Minor cleanup of global demotion messages (#7011) 2020-07-17 01:17:36 -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
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07: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
9aaab2c57b
Typescript Help Tickets and Modlog and fix warnings (#6352) 2020-02-12 21:48:03 -08:00
whales
28be861480 Don't use default property values in announcements 2019-11-15 16:14:00 +10:30
Guangcong Luo
411afba392 TypeScript Announcements/Poll chat plugins 2019-11-11 02:13:48 +13:00