pokemon-showdown/test/server
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
..
chat-plugins Typescript Trivia (#6768) 2020-05-29 23:53:52 -07:00
chat.js Use assert in strict mode 2020-02-20 00:39:31 -08:00
ladders.js Turn on prefer-const for .js files 2020-04-23 11:37:47 -07:00
room-battle.js Turn on prefer-const for .js files 2020-04-23 11:37:47 -07:00
rooms.js Refactor auth and room.settings (#6777) 2020-06-09 08:22:25 -07:00
sockets.js More thoroughly remove old sockets tests 2020-05-08 07:11:05 -07:00
users.js Refactor auth and room.settings (#6777) 2020-06-09 08:22:25 -07:00