Commit Graph

875 Commits

Author SHA1 Message Date
Annika
53cebdc09d
Daily spotlights: Add alias for /viewspotlights (#7453) 2020-10-01 15:46:24 -07:00
Jeremy Tan Jie Rui
6e956aee51
Add documentation on maxgen parameter to /ds (#7451) 2020-10-01 09:40:17 -07:00
Mia
3e92bcd2cc
Quotes: Remove the broadcast cooldown for /randquote (#7450) 2020-10-01 09:39:54 -07:00
Annika
0cf43e7461
Modlog: Default to searching all fields (#7449) 2020-10-01 09:36:36 -07:00
Guangcong Luo
523c1a335d
Introduce Chat.oldPlugins (#7434)
This provides a new way to persist chat plugin data across hotpatches:
`Chat.oldPlugins`.

In a plugin, you can now do:

```
export const cache = Chat.oldPlugins.pluginname?.cache || {};
```

to create a cache that will persist across hotpatches.
2020-09-30 19:45:54 -07:00
Annika
0877f0ae1e
Modlog: Fix entries with an IP address and no user (#7446) 2020-09-30 17:55:41 -07:00
Annika
fa571d3b4b
Modlog viewer: Update regex for /ml roomid, search (#7444) 2020-09-30 12:32:15 -07:00
Annika
212b35b2fa
Modlog: Support exact user searches (#7443) 2020-09-30 11:22:49 -07:00
Annika
98b9bd69b1 Fix more modlog attributions 2020-09-29 17:39:28 -07:00
Guangcong Luo
3d68248efa Update to latest eslint
We're skipping two major typescript-eslint versions, so there are a
bunch of changes here, including:

- it's catching a lot of things it didn't catch in the past, for
  reasons unclear to me

- no-unused-vars has to be explicitly disabled in global-types now

- a lot of `ts-ignore`s were never necessary and have been fixed

- Crashlogger can now handle being thrown things that aren't errors.
  This has never been a problem in the past, but to satisfy TypeScript
	we might as well not die in a fire on the off chance someone tries to
	`throw null` or something.
2020-09-29 15:28:08 -07:00
Mia
b7630b70cf
Chatlog: Handle ErrorMessage properly (#7438) 2020-09-29 14:30:50 -07:00
Kris Johnson
8d080ff320
UNO: Fix timestamp and switch to Chat.ErrorMessage (#7437) 2020-09-29 08:53:21 -07:00
Mia
a9645d29f1 Modlog: fix defaulting to roomid in /modlog 2020-09-28 18:04:57 -05:00
Mia
1eb2c77208
Modlog viewer: Improve UI (#7436) 2020-09-28 16:01:05 -07:00
Annika
6e2a336975 Don't duplicate attributions in modlog entries 2020-09-28 15:26:30 -07:00
Annika
f2ef093493
Modlog: Parse entries in the child process (#7435) 2020-09-28 12:04:06 -07:00
Charlie Kobayashi
493bd033c7
Scavengers: Add October twist (#7433) 2020-09-28 11:21:36 -07:00
Annika
f1b4e3d43a
Modlog: Refactor to use ModlogEntry objects (#7403) 2020-09-28 11:06:30 -07:00
The Immortal
b67701d8a4
Add suspect tests plugin (#7427) 2020-09-27 15:41:04 -07:00
Annika
b865fe537c
Trivia: Fix Mastermind (#7419) 2020-09-27 13:03:06 -07:00
Guangcong Luo
9fe45238f5
Introduce chunk readers for ReadStream (#7215)
This adds new functions `stream.byChunk(bytes)`, `stream.byLine()` etc
which parse a `ReadStream` into an `ObjectReadStream<string>` which
can then be consumed with for-await.

Fixes #7195
2020-09-27 08:55:59 -07:00
Mia
f7288df665 Fix build 2020-09-26 23:27:51 -05:00
Mia
62bcce1d55 Plugins: Don't try-catch ENOENT errors when using FS.readIfExists() 2020-09-26 23:02:45 -05:00
Charlie Kobayashi
eee5e5fa63
Quotes: escape some HTML (#7425) 2020-09-26 20:29:32 -07:00
Mia
78933408bf
Quotes: Move to a chat plugin (#7421) 2020-09-26 08:11:42 -07:00
Annika
2e6ed8a50f
Helptickets: Fix double notification (#7415)
We should only be sending notifications through Staff room rather than the page.
2020-09-25 00:17:14 +04:00
Annika
eb2261b846
Helptickets: Close a user's ticket on global ban (#7411) 2020-09-22 21:00:38 -07:00
Kris Johnson
5a8ded0568
Room FAQs: Convert the rfaq list to a page (#7394) 2020-09-22 19:30:05 -07:00
Mia
7a89492947
Chatlog: Use ProcessManager for searches (#7393) 2020-09-22 18:23:01 -07:00
Annika
1e20f6a96f
Trivia: Add leaderboard management commands (#7402) 2020-09-20 16:33:03 -07:00
Annika
4a61ffd5ac
Trivia: Use Room#subGame for Mastermind (#7371) 2020-09-19 18:32:44 -07:00
Mia
2db1922e87
Battlesearch: Improve phrasing and UI (#7396) 2020-09-19 16:22:15 -07:00
Mia
ae7a46dd37
Chat: Move forcerename tracking to Monitor and Punishments (#7381) 2020-09-19 02:04:49 -07:00
Guangcong Luo
46c470671a
Unify /guess (#7387) 2020-09-19 01:24:52 -07:00
Annika
59ba8aa876
Chat filters: Support custom redtext (#7392) 2020-09-18 20:38:53 -07:00
Annika
6d8d0bd93a
Trivia: Use Chat.ErrorMessage more (#7384) 2020-09-18 16:19:26 -07:00
Mia
6f28e459f3
Battlesearch: Support searching for multiple users and searching months (#7382) 2020-09-18 07:44:33 -07:00
Quinton Lee
bf400c4ef1
Restore global bot permissions for /filters list (#7385) 2020-09-18 05:08:51 -07:00
Annika
357131ec68
Escape regexes in the filter display page
Lookbehind regexes cause problems....
2020-09-16 15:36:08 -07:00
Annika
ba4bb2f120
Helptickets: Display user language and remove prefix (#7373) 2020-09-16 01:21:07 -07:00
Annika
466dfcc5ce Trivia: Fix start officials 2020-09-14 18:06:57 -07:00
Mia
041d8fb0ed
Helptickets: Refactor bans to use the punishment interface (#7365) 2020-09-14 17:02:57 -07:00
Mia
96b4c4c841
Searchlogs: Don't require a room (#7367) 2020-09-14 16:27:26 -07:00
Annika
422649dca7
Trivia: Add a new game called Mastermind (#7368) 2020-09-14 16:03:50 -07:00
whales
3cae09feab Mafia: Fix forcehost 2020-09-13 12:14:49 +09:30
Kris Johnson
b7b609a205 Display BST properly in /crossevo and /showevo 2020-09-11 18:53:08 -06:00
Mia
aa9c36ca62
Thing of the Day: Fix bug in removing users (#7353) 2020-09-11 12:54:56 -07:00
whales
89d1d1a9cf Mafia: Fix broadcasting queue 2020-09-12 00:52:08 +09:30
Mia
23f0c6be74
Helpticket list: Respect ignoring tickets (#7345) 2020-09-10 17:26:31 -07:00
Mia
852858a7a0
Help: Fix issue with approvals (#7347) 2020-09-10 13:35:16 -07:00
Annika
34ec6ebb56
Help chatfilter: Add closing </code> tag in help (#7346) 2020-09-09 17:58:21 -07:00
whalemer
1511fcb821
Mafia: Update permissions (#7324) 2020-09-08 12:25:25 +09:30
Annika
471fe7365a
Add "η" to the evasion filter (#7330)
See https://replay.pokemonshowdown.com/gen8nationaldex-1182878993 for an example of how this can be used to evade.
2020-09-07 12:49:11 -07:00
Annika
8789d619f6
Chatfilters: Spoiler autolocking banwords (#7295) 2020-09-06 17:53:33 -07:00
Annika
0a26579afa
Make core commands translatable (#7279) 2020-09-06 17:49:53 -07:00
Annika
52cfaa999b
Trivia: Add short alias for casesensitivesearch (#7325) 2020-09-06 15:05:32 -07:00
Mia
44fc0123ad
Chat: Refactor CommandContext and PageContext to use ErrorMessage more (#7234) 2020-09-06 00:15:16 -07:00
Annika
f4081991d3
Modlog viewer: Fix more button for shared modlogs (#7320) 2020-09-05 20:44:40 -07:00
Mia
8f8e197d9c
Helptickets: Stop modlogging to Help room (#7070) 2020-09-05 18:25:20 -07:00
Annika
1a987c00bf
Trivia: Support specifying case sensitivity in searches (#7316)
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
2020-09-05 17:32:40 -07:00
Annika
08818294a8
Log viewer: Escape usernames (#7309) 2020-09-05 08:16:29 -07:00
Mia
6b671e9526
Searchlogs: Improve handling of date not found errors (#7308) 2020-09-03 17:52:20 -07:00
Mia
73e5284db3
Searchlogs: Fix crash in date parsing (#7307) 2020-09-03 17:24:47 -07:00
Lusamine
19355641f0
Remove Anubis from Credits (#7306) 2020-09-03 17:06:54 -07:00
HoeenHero
6dab83d6c4 Remove unneeded canTalk check
mia asked me to push this since keeping this check will result
in a ghost message if a match is found.
2020-09-02 23:29:57 -04:00
Annika
c5833d637a
Thing of the Day: Fix crash (#7301) 2020-09-02 21:35:31 -04:00
Mia
3a8bd28a6f
Help: Fix vulnerabilities (#7300) 2020-09-02 21:31:37 -04:00
Annika
8bc416730e
Trivia: Reformat help and don't use module.exports (#7292) 2020-09-02 12:07:24 -07:00
Mia
2e5bd14bbe
Help: Disable if a room is not configured (#7287) 2020-08-31 16:21:28 -04:00
Mia
42ba4b87d2
Youtube: Fix crash (#7280) 2020-08-31 06:45:35 -07:00
Mia
9a0f1ed11e
Fix regex replacing (#7265) 2020-08-31 06:19:04 -07:00
Annika
c9fa3fc389
Refactor User#prevNames and User#ips to arrays (#7267) 2020-08-29 10:27:03 -07:00
Mia
a8e8604967
Help: Fix crash with approvals (#7275) 2020-08-29 00:02:31 -07:00
Mia
a68b1fc31d
Help: Fix HTML error in regex page (#7268) 2020-08-27 00:00:24 -07:00
Annika
9d57cc096b
Use the room language to translate mod actions (#7261) 2020-08-26 09:05:34 -07:00
Charlie Kobayashi
0828d91deb
Scavengers: fix display bugs (#7232) 2020-08-26 07:51:12 -07:00
Mia
f2a8e4c28b
Help: Allow regular users to suggest regexes (#7260) 2020-08-26 02:20:57 -07:00
ayiadvance
dc0a52db13
Add reveal option and fix forceresetroles for mafia (#6695) 2020-08-26 18:13:56 +09:30
Annika
6931e59df7
Improve Pokémon nickname filter and autolocks (#7253) 2020-08-23 20:41:51 -07:00
Annika
5df47bb388
Allow staff to partially bypass the status filter (#7213) 2020-08-23 04:28:10 -07:00
Guangcong Luo
e14485656f Implement a basic /hiderank
This doesn't really have any nice-to-have automatic restoration
features but it should be all the important parts.

`user.group` no longer exists, and has been replaced with
`user.tempGroup`, which now applies both to temporary promotions of
unregistered users, as well as temporary hidden ranks of auth.
2020-08-22 07:20:26 -07:00
Annika
ff1cb70a95
Handle evasion filters in Pokémon nicknames (#7246) 2020-08-22 01:26:07 -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
8d79bf9725 Rename Dex.deepClone to Utils.deepClone
`this.dex.deepClone` still exists as an alias to `Utils.deepClone` for
use in `data/`. I'll need to spend more time figuring out the correct
solution there.
2020-08-21 04:24:34 -07:00
Annika
44d369ca8a
Allow users to set their own language and translate helptickets (#7220) 2020-08-19 00:21:51 -07:00
Mia
d8ecdb5f83
Help: Only write state when relevant to the room (#7207) 2020-08-18 13:06:52 -07:00
Annika
c00e66b76d
Datasearch: Support excluding monotype Pokemon (#7214) 2020-08-15 15:44:46 -07:00
Annika
4cbf905ec8
Modlog: Fix exact searches and improve hotpatching (#7211) 2020-08-15 14:10:46 -07:00
Kris Johnson
7fc3cd516e
Add /nomarkshared (#7201) 2020-08-12 16:21:00 -07:00
Kris Johnson
5e255012bc
Add a 'bst' property to Species (#7138) 2020-08-12 12:06:09 -07:00
Stephen Middleton
33e6783d04
Wifi: Change Lottery winner logic (#6970)
After a Policy decision within Wi-Fi Staff, it's been decided to update the
Lottery Giveaway to still pick winners when there are less than maxWinners,
but people entered. This will allow low entry GA's to overestimate and still
have winners.
2020-08-12 10:03:39 -07:00
Annika
7df8ad12a9
Hosts: Fix bug with /ipranges widen (#7202) 2020-08-12 10:03:08 -07:00
DieterReinert
47e780ef2c
Poll: missing < in opening tag (#7194) 2020-08-10 16:30:59 +04:00
Annika
1c5f989837
Datasearch: Allow all-only searches if sorted (#7182) 2020-08-08 01:11:46 -07:00
Annika
ce8a1dd975
IPTools: Remove '-nohost' suffix and make minor improvements (#7108) 2020-08-07 14:47:18 -07:00
Annika
e47461da6d
Trivia: Fix translation formatting (#7175) 2020-08-07 11:39:18 -07:00
Annika
4318d7c9bc
Fix modlog formatting (#7173) 2020-08-07 11:17:34 -07:00
Mia
deeed6c789
Remove sim/ and data/'s globals (#7091) 2020-08-07 06:44:15 -07:00
Annika
f563252418
Modlog: Fix bugs and support hotpatching (#7163) 2020-08-06 22:05:13 -04:00
Mia
00526bb604
Help messagefilter: fix crash (#7158) 2020-08-06 10:05:03 -07:00
Lusamine
0f56db1853
Remove extra parentheses from 2 other privateModAction (#7162) 2020-08-06 10:04:36 -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
Kris Johnson
f96ec4fb05
Add strict types to tiers (#7135) 2020-08-06 00:41:42 -07:00
Annika
f34ffa9e74
Refactor Modlog into one file (#7127) 2020-08-06 00:39:37 -07:00
Mia
fd0f83ff8d
Add a command to show the user's team in battles (#7068) 2020-08-06 00:36:43 -07:00
Mia
fbe5d90dd0
Youtube: Add tests (#7081) 2020-08-06 00:34:18 -07:00
Annika
7f3e55deb9
Improve help message formatting for /searchlogs (#7136) 2020-08-05 23:47:08 -07:00
Mia
647d5af76f
Add a filter for auto-answering questions in the Help room (#7100) 2020-08-05 23:44:46 -07:00
Annika
42451ff430
Trivia: Make strings translatable (#7156) 2020-08-05 23:23:35 -07:00
Annika
ae11a699a6
Add a BasicRoom#tr method (#7143) 2020-08-05 19:14:41 -07:00
Kris Johnson
8c22d4ce97
Add /flipped command (#7139) 2020-08-05 05:40:31 +04:00
Annika
92552da849
Helptickets: Always respect ignoreTickets (#7144) 2020-08-04 01:32:39 -07:00
Mia
b9c9addfdb
Searchlog: Fix crash (#7121) 2020-08-02 16:35:07 -07:00
Annika
ee67a41184
Fix crash in Announcements (#7126) 2020-08-02 16:10:50 -07:00
Leonard Craft III
d93501949e
Fix /lottery participants from escaping container (#7116) 2020-08-01 22:54:15 -07:00
Annika
6b1a53ae95
Trivia: Add Infinite length (#7114) 2020-08-01 17:06:50 -07:00
Annika
1b52e51ae0
Polls: Make strings translatable (#7110) 2020-08-01 16:51:41 -07:00
Charlie Kobayashi
448c9cbcee
Scavengers: general improvements (#7105)
- Add new command to directly stuff a hunt back into the queue
- Better queue response
- Fix extra spaces in teamscav team names
- Get rid of some old code tidbits that were neccessary when roomlogs were still bork
2020-07-31 18:34:47 -07:00
Mia
2a9015457d
Chatlog: Improve search (#6955) 2020-07-31 18:00:54 -07:00
Annika
f472b6c123
Announcements: Make strings translateable (#7102) 2020-07-31 17:00:37 -07:00
Annika
f25fc4c344
Trivia: Display question numbers (#7097) 2020-07-31 14:39:23 -07:00
Annika
05a9f9a1e5
Minor code quality improvements based on LGTM (#7092) 2020-07-30 14:24:37 -07:00
Annika
cd85cd7a9d
Hosts & IPTools: Refactor to remove hardcoded ranges (#7078) 2020-07-29 23:04:50 -07:00
Guangcong Luo
328ba42a12 Change onChatMessage API to use void return
onChatMessage previously took `string | false`, where `false` means
"let the message through". This is a reversal of what `false` usually
means, so this is now updated to `string | void`, which should be
much clearer.
2020-07-29 15:01:04 -07:00
Guangcong Luo
fe2eb27860
Refactor ip and modchat permissions (#7076)
- `ip` and `ipself` are now separate permissions. This means that `ip`
  is now a generalized permission for viewing IPs (no more need to use
  `globalban`, since `ipself` now controls the ability to see your own
  IP address)

- `alts` and `altsself` are now also separate (all users used to be
  able to `altsself`).

- `modchat`, `modchatall`, and `manageroom` are now just one `modchat`
  permission whose jurisdiction controls how high you can set modchat.
2020-07-29 00:38:52 -07:00
Peach
d87eeb4e2c
Don't modnote twice on joining a helpticket (#7049) 2020-07-29 00:17:24 -07:00
Guangcong Luo
98b5956d93 Linkify TextMonitor roomids 2020-07-28 20:08:27 -04:00
Annika
c16750741a
Fix hotpatching IPTools and multiline patterns for Hosts (#7069) 2020-07-27 01:51:28 -07:00
Annika
1bb3ed1531
Trivia: Show creator in /trivia history (#7067) 2020-07-26 15:34:12 -07:00
Annika
e0c18e8e0b
Refactor IPTools and add a host management chat plugin (#7061) 2020-07-26 12:41:27 -07:00
Annika
c5ebc2683c
Add a help message for /chatlog (#7063) 2020-07-25 21:32:26 -07:00
Annika
74e13815af
Modlog: Mark room tournaments in modlog (#7062) 2020-07-25 21:32:01 -07:00
Guangcong Luo
c08a1a3199 Fix drivers not having mod powers in battles
Battles are now considered personal rooms, and so
`globalGroupInPersonalRoom` now applies to them properly.
2020-07-24 18:51:38 -07:00
Annika
7248e6f87c
Helptickets: Fix grammar and add text about appealing locks (#7055) 2020-07-24 15:59:58 -07:00
Guangcong Luo
2f805c93a2
Remove "Battle" prefix from data exports (#7039)
`BattlePokedex` is now `Pokedex`, `BattleItems` is now `Items`, etc.

I also renamed `Movedex` to `Moves` and `Statuses` to `Conditions`.

`TypeChart` isn't `Types` yet, because unlike the others, it's not
indexed by ID. That should probably be fixed one day.
2020-07-24 12:42:26 -07:00
Peach
be2deb2372
Link IPs in modlog (#7048) 2020-07-24 10:47:43 -07:00
Kris Johnson
00b88b521d
Handle Gigantamaxing properly (#7001) 2020-07-23 13:27:42 -07:00
Annika
a11753de7a
Trivia: Support pausing and resuming games (#7038) 2020-07-23 12:59:14 -07:00
Kris Johnson
31d62a77d8
UNO: Fix typo (#7035) 2020-07-22 23:58:07 -07:00
Peach
e9611b7ce2
Remove unnecessary references to the global room (#7033) 2020-07-22 08:52:46 -07:00
Lusamine
3a2ca90040
Minor cleanup of global demotion messages (#7011) 2020-07-17 01:17:36 -07:00
Nol
b5ada89a74
Wi-Fi: Update Giveaway Message (#7004)
* Wi-Fi: Update Giveaway Message

* Remove Enter
2020-07-14 22:17:07 +02:00
Mia
6690cfb037
Fix pollqueue page crash (#6986) 2020-07-09 22:19:43 -07:00
Annika
db4bb7b46f
Roomevents: Delete events fully (#6984) 2020-07-09 05:00:43 -07:00
Annika
2c24650cf7
Daily spotlight: Fix regex to allow whitespace (#6985) 2020-07-09 05:00:22 -07:00
Annika
573eb439f8
Datasearch: Don't use Object.keys() in /ds monotype (#6982) 2020-07-08 15:39:46 -07:00
Annika
c2f4e524b8
Datasearch: Support /ds monotype without a type (#6981) 2020-07-08 15:12:40 -07:00
Kris Johnson
127a04b19e
Make improvements to the UNO game (#6980) 2020-07-08 15:12:14 -07:00
Annika
d2a61a2b9d
Daily spotlights: Add queue management commands (#6974) 2020-07-07 16:14:50 -07:00
ZestOfLife
a594f0b816
Mafia: Make CS indication more obvious for hosts (#6684) 2020-07-07 14:01:33 +09:30
Kirk Scheibelhut
eea2196280
Server side changes to support persistent user settings and privacy changes (#6947)
NOTE: This is changes the semantics of `hidenext`/`ionext` from
applying to the next created *battle* to applying to the next
created *search*/*challenge*.
2020-07-06 21:18:38 -07:00
Annika
d42e17b7ff
Trivia: Changes to the random category selector (#6971) 2020-07-06 21:16:57 -07:00
Guangcong Luo
c124720885
Support throwing error messages (#6946)
The idea is that throwing `ErrorMessage` will replace needing to pass
`context` variables around (which make it hard to unit test a lot of
chat functions).

I recognize the drawback is that it makes it harder to tell where
chat commands might return from. This might be somewhat alleviated by
a convention such as prefixing everything with `check`

    this.checkBroadcastable();

    this.checkCan('lock');

I honestly didn't like the old approach of `if (!this.can(...)) return`,
though. It didn't seem very obvious which commands would show error
messages and which needed you to write your own error messages. I think
the new system would at least be clearer about that.

We can also consider things such as some sort of sigil, such as:

    !this.checkCan('lock');

There's no other reason to use `!` at the beginning of a line, so I
think this is reasonably unambiguous, although it might take some
time to learn. Also we'd have to screw with eslint.

Another alternative is something all-caps?

    this.CHECK_can('lock');

In the end, I still think `this.checkCan('lock')` would be enough, and
I still think it's already an improvement in many ways.
2020-07-06 14:07:02 -07:00
Guangcong Luo
8b3a3e47cf global is no longer a RoomID 2020-07-06 14:06:00 -07:00
whales
6d3cf8a972 Remove unnecessary room requirements from some commands 2020-07-07 00:54:50 +09:30
Spandan Punwatkar
fa5b90cba3
Add /showevo (#6957)
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2020-07-06 10:53:10 +04: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
Kirk Scheibelhut
bbfcd7ae25 Remove 'inappropriate status' from reports
Staff suggest this is never used for the correct reasons and is more
trouble than its worth
2020-07-04 18:14:10 -07:00
Guangcong Luo
d7ba455e2b Update permissions
Permissions have gotten out-of-date, so this commit syncs them.
Default permissions are now matched with Main, in particular including
the new & rank as admin (removing the old Leader rank and ~ symbol).

Relevant changes:
- Admin (~) and Leader (&) have been merged into Admin (&)
- The 'ban' permission was split into 'globalban' and 'ban'
- The 'broadcast' permission was renamed 'show' (going forward,
  "broadcast" should only refer to the big red/blue/green
  announcement bars.)
- Bots no longer have global moderation abilities, making it
  easier to give untrustworthy bots the "bot" rank.
2020-07-03 17:32:49 -04:00
Annika
61e0a2e9e4
Chatlog: Fix grammar in error message (#6951) 2020-07-03 10:47:08 -07:00
Guangcong Luo
bdb0b0ff72 Refactor Net use in YouTube plugin 2020-07-02 17:14:24 -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
Kris Johnson
7010e0286f
Add OMotM and RoA Spotlight for July 2020 (#6936) 2020-07-01 12:59:10 +04:00
Mia
857d5c648e
Youtube: Allow drivers to use /youtube update (#6933) 2020-06-30 12:11:09 -07:00
Annika
f017398ffc
Trivia: Automatically join a game when answering (#6923) 2020-06-28 12:03:05 -07:00
Annika
4b02342806
Datasearch: Support 'monotype' parameter in /ds (#6922)
also piggybacked a fix for /as in here
2020-06-28 05:17:00 -07:00
fart
8503a6de1f
Correct commands in poll queue help (#6916) 2020-06-25 12:43:04 +04:00
TheMezStrikes
b1247e7892
Fix multiple bugs in events (#6913) 2020-06-24 14:52:31 -07:00
Annika
a578ec99c6
Trivia: Fix bug in /trivia history (#6906) 2020-06-22 22:35:02 -07:00
Annika
bc2aec5c82
Roomevents: Support event categories (#6820) 2020-06-21 21:46:11 -07: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
Mia
f9e79220dd
Polls: Support queuing (#6595) 2020-06-20 23:56:04 -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
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
Mia
1f6029e156
Youtube: Fix ID crash (#6858) 2020-06-17 20:42:02 -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
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
394a4c5c9d
Fix UNO DQ message to use correct name (#6831) 2020-06-13 11:21:58 -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
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -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
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
PartMan
6848861887
Support Crit in Movesearch (#6808)
A lot of people had been asking about whether it was possible to search for moves with a high critical-hit ratio (relevant for building with things like Sniper or Focus Energy).

(Also includes a refactor to cut down on the number of type assertions
necessary in movesearch code, by Zarel)

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-06-08 09:52:21 -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
Annika
14140d1543
Roomevents: Fix bug in getAllAliases() (#6805) 2020-06-05 18:28:28 -07:00
Mia
da1da746b3
Youtube: Use Net library (#6803) 2020-06-05 15:20:29 -07:00
Charlie Kobayashi
3394053fb6
Scavengers - minor fixes (#6802) 2020-06-05 08:03:42 +02:00
Mia
cf42c6269a
Add a library for making HTTP/S requests (#6744) 2020-06-04 11:53:58 -07:00
Guangcong Luo
7b33aef0e3 Fix room events crashing with no alias
PR #6781 only fixed one of the crashes; the real problem was that the
code expects aliases to be an empty array if rooms have no aliases,
which have multiple flaws including unnecessarily taking up JSON
space.
2020-06-04 14:49:38 -04:00
Mia
c9c7f6a747
Youtube: Accredit videos and improve interval (#6762) 2020-06-04 06:54:05 -07:00
Annika
acaa378e89
Roomevents: Fix bug with not displaying aliases (#6798) 2020-06-03 10:56:43 -07:00
Charlie Kobayashi
9fc16889bd
Scavengers: Add Team Scavs mode (#6794) 2020-06-03 09:47:19 -07:00
SSlayer9
919ce1ef5d
Hide event alias column in event table if empty (#6791) 2020-06-03 03:29:57 -07:00
Annika
7a1a989927
Datasearch: Support gen and maxgen flags in /is and /as (#6793) 2020-06-02 22:31:08 -07:00
fart
3add88abdf
Room Events: Fix crash when room event "aliases" is undefined (#6781) 2020-05-31 13:45:31 -04:00
asgdf
386b5863f4
Support binary/hex/octal output in /math (#6686) 2020-05-31 10:27:06 -07:00
Annika
61905ab8e0
Datasearch: Use species.nfe in /dexsearch (#6778) 2020-05-30 22:38:21 -07:00
Annika
0bb3c99f93
Datasearch: Support searching for fully evolved Pokemon (#6775)
also redesigned dexsearchhelp
2020-05-30 21:45:01 -07:00
Annika
b454343aee
Room events: Support aliases and renaming (#6748) 2020-05-30 17:54:13 -07:00
Mia
793a704d93
Trivia: Fix bug in getting the game (#6770)
room.getGame always returned null, since trivia games have different constructor names, so no one could join and no games could be ended.
2020-05-30 03:33:30 -07:00
Kris Johnson
18fbcbc914
Typescript Trivia (#6768) 2020-05-29 23:53:52 -07:00
Annika
c67ada355b
Datasearch: Support searching for moves by target (#6755)
(Also redesign movesearchhelp)
2020-05-29 20:22:29 -07:00
DeltaCoderr
1c33855a3d
YouTube: Fix Grammar (#6761)
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
2020-05-29 18:32:52 +02:00
Guangcong Luo
26aebe0aaa Improve Scavengers design
- Long answers now wrap (I tried so many different ways to do this
  in CSS, involving nested divs with max-width, and ended up giving
  up and just inserting `<wbr />`s into the code.

- Hints are now in boxes, making them easier to see

- There's a "to answer, use /scavenge ANSWER" prompt next to the
  hunt start message, to help new players.

- Fixed a bug with help permissions
2020-05-29 04:22:40 -04:00
Mia
73b7b451d0
Fix crash in YouTube plugin (#6757) 2020-05-29 01:16:26 -07:00
Annika
814bf797e8
Datasearch: Add /abilitysearch command (#6759) 2020-05-28 22:06:35 -07:00
Annika
9c13f73bad
Trivia: improve help and allow changing answers in Triumvirate (#6753)
* Trivia: improve help for /trivia new

* Trivia: allow changing answers in Triumvirate mode

* tars -> targets

* Escape player usernames
2020-05-28 10:13:51 +02:00
Mia
c09ecdb12b
Chatlog: Fix memory crashes, improve UI (#6750) 2020-05-27 21:47:50 -04:00
HoeenHero
02164f2ba0 Youtube: Don't crash when adding an invalid channel 2020-05-27 08:16:22 -04:00
Mia
40f5fcf0e2
Youtube: Error out if there are no channels in the database (#6749) 2020-05-26 23:44:02 -07:00
Guangcong Luo
69f866ea94 Rephrase "has crashed" to "crashed"
This is a really minor thing, but fewer words tend to make
sentences more readable, and crash messages should focus more
on why something crashed than the crash itself.
2020-05-26 19:35:46 -04:00
Mia
de24f97f03
Youtube: Add plugin for viewing videos/channels (#6740) 2020-05-25 18:35:38 -07:00
Mia
c246ae51b4
Support searching roomlog entries (#6494) 2020-05-25 18:22:51 -07:00
Annika
7fd6d4f7f4
Trivia: Remove Weakest Link (#6743) 2020-05-25 17:16:44 -07:00
Annika
a4f56d27d2
Trivia: Add Triumvirate mode (#6742) 2020-05-25 14:13:21 -07:00
cheese-testing
8dbef59cd7
Scavenger games: Allow finishers to continue and announce correctly 2020-05-24 21:42:35 +02:00
Charlie Kobayashi
0229d9bb01
Initialize scavSettings properly (#6735) 2020-05-23 15:02:46 -07:00
Charlie Kobayashi
b30d09a3eb
Scavengers: Initialize all settings as null (#6734) 2020-05-23 14:46:59 -07:00
AnnikaCodes
8fb5e93433
Trivia: support picking a random mode (#6731)
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2020-05-23 15:45:16 +02:00
Charlie Kobayashi
9cb8fc4257
Scavengers: Convert to TypeScript (#6726) 2020-05-22 17:06:03 -07:00
PartMan
2588cee95c
Fix Visual Lottery Bug (#6729)
https://www.smogon.com/forums/threads/bug-reports-v4-read-original-post-before-posting.3663703/post-8474970
2020-05-21 17:56:09 -07:00
Nol
41300c183c
Wi-Fi: Update giveaway message (#6725) 2020-05-21 18:14:39 +02:00
spixi
67d6ffb236
Fix /om chat command: wrong URL (#6722) (#6723) 2020-05-20 17:46:27 -07:00
asgdf
9af7d0c948
Wifi plugin: Fix display issues (#6720) 2020-05-20 15:54:18 +04:00
PartMan
7185d8129b Remove 10-minute restriction from Help
(They now work before the 10-limit mark; updating the help message to reflect that)
2020-05-19 00:27:51 +02:00
Guangcong Luo
0fa758bbea Hide uhtml from /chatlog by default
uhtmlchange messages, which should never have been in the chatlog
in the first place, are now always hidden.

uhtml messages are now hidden by default (can be shown with the `all`
option), because they lead to huge message sizes which cause problems
with the server, in gamecorner and a few other rooms which use it a
lot.
2020-05-18 17:04:42 -04:00
Charlie Kobayashi
75105eea8d
Scavengers: Remove 10 minute restriction on hints (#6707) 2020-05-16 18:45:16 -07:00
Konrad Borowski
c687b3b0ed
Replace attributed uhtml on change (#6693)
Not doing so wastes a lot of bandwidth.

This fixes https://www.smogon.com/forums/threads/dont-send-all-uhtml-messages.3664370/

`|uhtmlchange|` is no longer automatically parsed; please use
`room.uhtmlchange(` instead.
2020-05-16 07:16:42 -07:00
Kris Johnson
9b56380bbc
Random Battles chat plugin: Add /cap1v1 (#6698) 2020-05-16 10:45:31 +04:00
1Nactive
491b5439d8
vgotd: replace quote with tagline (#6689) 2020-05-15 13:11:35 -04:00
PartMan
a362aeb9b5
SAdd /scav removehint and /scav edithint (#6690) 2020-05-15 09:48:33 +02:00
TheMezStrikes
b29e3b53af
vgotd: add missing Image property (#6677) 2020-05-14 10:52:51 -04:00
HoeenHero
b39b583b4b Add support for a Video Game of the day 2020-05-11 13:39:18 -04:00
Leonard Craft III
0dfdf5955b
Fix /ms max (#6667) 2020-05-10 01:37:21 -07:00
whales
65539381fd Mafia: Bugfixes 2020-05-08 00:41:56 +09:30
Kirk Scheibelhut
2af7040270
Group zMove and maxMove attributes (#6652)
This mostly serves to provide cleaner and more consistent field
naming. maxMove currently doesn't have boosts or effects to group
together but who knows what will be thrown at us via DLC, and being
symmetrical with zMoves is a nice.
2020-05-04 20:21:27 -07:00
Lusamine
49ab39dc8b
Fix sprite formes for Wi-Fi lotto giveaways (#6645) 2020-05-02 20:27:08 -07:00
Charlie Kobayashi
4a3881a1c0
Scavengers: Add Jump Start (#6647) 2020-05-02 20:18:11 -07:00
whales
86e29cbfa6 Mafia: Fix bug when joining games 2020-05-03 01:51:28 +09:30
Waleed Hassan
e34301fc07
Lottery: Listify & Hide participants in a readmore (#6642) 2020-05-02 19:06:26 +04:00
Guangcong Luo
56f6ab5489 Fix Zygarde-Complete validation 2020-05-01 13:02:30 -07:00