Commit Graph

994 Commits

Author SHA1 Message Date
Annika
bc2aec5c82
Roomevents: Support event categories (#6820) 2020-06-21 21:46:11 -07:00
asgdf
2a570291e1
Remove incorrect host classification (#6893)
A large portion of the IPs with that hostname are static broadband connections.
2020-06-21 19:22:22 -04:00
Guangcong Luo
6af875af8b Improve RoomPermission/GlobalPermission checks
Global permissions can no longer be used as room permissions. Instead,
the two are entirely separate lists, with only a few permissions in
both lists.
2020-06-21 03:53:06 -07:00
Guangcong Luo
ee6e43b552 Strongly type RoomPermission and GlobalPermission
`user-groups.ts` now tracks the list of possible values for
`RoomPermission` and `GlobalPermission` in a const.
2020-06-21 01:43:27 -07:00
Mia
f9e79220dd
Polls: Support queuing (#6595) 2020-06-20 23:56:04 -07:00
Guangcong Luo
214aef6df6 Strongly type Rooms.global.settingsList 2020-06-20 21:45:02 -07:00
Nixola
00d0647dec
Prevent empty string from being added to banwords (#6887)
Filter out empty strings from the `banword add` and `banword delete`
arguments. Added a check in `banword add` for an empty array of
arguments.
2020-06-20 20:50:53 -07:00
urkerab
273eb928cf
Show status immunities in /weak output (#6889) 2020-06-20 20:49:50 -07:00
Mia
f306ed069f
Youtube: Fix crash (#6891)
Ensure video data exists in the response
2020-06-20 20:47:55 -07:00
Mia
a888c10bb6
Youtube: Don't crash if key isn't configured (#6848) 2020-06-20 20:16:07 -07:00
Annika
128d36aa0b
Trivia: Add /trivia history command (#6880) 2020-06-19 22:43:10 -07:00
Peach
6c517b5562
Roomsettings: Fix language, modjoin, button formatting (#6879) 2020-06-19 17:36:37 -07:00
Guangcong Luo
20336fdfa0 Refactor /requestshow 2020-06-18 23:47:39 -07:00
Mia
501f773204
Improve /requestshow (#6868) 2020-06-18 23:43:41 -07:00
Mia
d2b255b934
/eval: Log in dev room and broadcast (#6871)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-06-18 23:28:15 -07:00
Mia
f8b95ce9a0
Rooms: Save creation time for all rooms (#6845) 2020-06-18 19:45:30 -07:00
Ben Davies
b867fce831 Don't use String#split with an empty string as an argument
String#split with an empty string as an argument butchers Unicode
codepoints that are more than one character long.
String#[Symbol.iterator] doesn't, and is also faster.
2020-06-18 10:50:44 -03:00
Guangcong Luo
af7ca0e73c Clarify "Whitelist" in /roomauth as staff-only
I definitely heard some staff members be concerned that it shouldn't
be shown to regular users.
2020-06-18 00:01:57 -04:00
Mia
233f2aef9a
Fix setting modchat in battles (#6860) 2020-06-17 20:46:59 -07:00
Mia
1f6029e156
Youtube: Fix ID crash (#6858) 2020-06-17 20:42:02 -07:00
Guangcong Luo
cc22bae74f Fix crash in /editbattle 2020-06-17 18:12:34 -07:00
Guangcong Luo
839d86a2ab Refactor /makegroupchat a little
None of these are likely to fix the lag spike, but I couldn't find
anything that stuck out.
2020-06-17 21:11:52 -04: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
Charlie Kobayashi
e51c4ce290
Fix minor issues with /show commands (#6849) 2020-06-16 20:12:34 -07:00
Charlie Kobayashi
95b29974fd
Fix server crash from overlength posts (#6847)
(Server would crash and be unable to handle any further inputs from users)

Byproduct of #6745
2020-06-16 19:42:55 -07:00
Guangcong Luo
32b5b43244 Fix unexcaped URI in /requestshow 2020-06-16 18:44:23 -07:00
Mia
9521580ecf
Modlog: Prevent non-gstaff from searching for IPs (#6844) 2020-06-16 15:51:59 -07:00
Mia
6c97866f83
Add commands to show media in chat (#6745) 2020-06-16 14:40:10 -07:00
Annika
f177ae31dc
Trivia: Fix bug with computing user ranking (#6843) 2020-06-16 14:03:39 -07:00
PartMan
0127813e8c
Show given hints on /scav hint (#6842) 2020-06-16 11:22:44 +02:00
Annika
838d53bf93
Modlog: Escape search terms (#6835) 2020-06-14 19:39:57 -07:00
Guangcong Luo
902dfaba4f Better document debug options in config-example.js 2020-06-13 15:58:35 -07:00
Kris Johnson
3228f91fbc
Fix uncommon evolution methods (#6830) 2020-06-13 12:46:21 -07:00
Kris Johnson
394a4c5c9d
Fix UNO DQ message to use correct name (#6831) 2020-06-13 11:21:58 -07:00
Guangcong Luo
8748427dce Fix TS error in PM
It's surprising to me that this happened after e0f97dcf6b, which
doesn't touch this line.
2020-06-13 10:54:22 -07:00
Guangcong Luo
e0f97dcf6b Replace Chat.uncache* with Utils.clearRequireCache
This replaces the old approach with a new "clear everything except a
whitelist" approach, which should overall involve much less code and
lead to fewer bugs of the "the path changed for a module and I forgot
to update the uncache paths" variety.

I considered a lot of other approaches, but they seem to have more
flaws without any advantages in exchange for them. (We moved away
from `uncacheTree` because it only tracks the first require: there's
no way to get a full list of dependents for a module, only its first
dependent.)
2020-06-12 22:02:32 -07:00
Guangcong Luo
d592c838c2 Separate Config.ofemain and Config.ofesockets 2020-06-12 22:02:32 -07:00
Guangcong Luo
97b856596e Fix lobby autojoin on side servers 2020-06-11 17:06:16 -07:00
Annika
428205fe93
Don't default to showing 'trusted' in /userauth (#6828) 2020-06-11 16:01:55 -07:00
Austin Couturier
c9b2b9dbf2
Change |pm|~ to |pm|& (#6827) 2020-06-10 21:53:36 -07:00
Annika
7af048c85b
Datasearch: Fix maxgen and learnset interaction (#6825) 2020-06-10 21:53:21 -07:00
Mia
31263c79a0
Youtube: Fix crashes with checking ID (#6826) 2020-06-10 21:52:54 -07:00
Guangcong Luo
1e5b5ab465 Update Streams API with pushEnd/writeEnd
Previously, ending a read stream was `stream.push(null)`, and ending a
write stream was `stream.end()`. This was often confusing, and so now,
these are consistently `stream.pushEnd()` and `stream.writeEnd()`.

This refactor already found a bug in which `stream.end()` was used
where `stream.push(null)` should have been.

Also in this refactor: By default, `pushError` ends the stream. You can
pass `true` as the second parameter if the error is recoverable (the
stream shouldn't end).
2020-06-10 16:07:24 -07:00
Guangcong Luo
0629a915a0 Support multiline /eval and /evalbattle 2020-06-10 11:23:20 -04:00
Guangcong Luo
140f4ad936 Support /forceroompromote
Previously, forcepromotes were done with a !!! sigil, which was
kind of silly. They now use a command starting with "force", as
is standard.
2020-06-10 11:23:20 -04:00
Guangcong Luo
0da724cba7 Correct /auth sorting direction
This also refactors /auth and /roomauth to both be in
moderation.ts (as good a place as any), and to use Utils.sortBy.
2020-06-10 11:23:20 -04:00
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
Guangcong Luo
b53480b364 Fix memory leak in ladders-remote 2020-06-09 18:31:29 -07:00
Charlie Kobayashi
f4c680ac68
Scavengers: Fix /scavtop error due to auth/settings refactor (#6823) 2020-06-09 17:33:03 -07:00
Guangcong Luo
8c4d55b184 Fix bugs in Settings refactor 2020-06-09 15:40:54 -04:00