Commit Graph

875 Commits

Author SHA1 Message Date
Mia
ca94dea20f
FS: Fix hotpatching and add more throttling (#7878)
- `writeUpdate` state is now stored in a global variable, so hotpatching doesn't crash it
- throttling now writes on the tail (so two throttled `writeUpdate` calls will write one update, not two)
- room settings, punishments, and helptickets are now throttled
2021-01-09 15:49:30 -08:00
Mia
d5e7f3f778
Modlog: Add more shorthand commands (#7896) 2021-01-09 01:00:05 -08:00
Distrib
270a55ef0b
Improve /help events (#7895)
Pr for imrove help events, same https://github.com/smogon/pokemon-showdown/pull/7828
2021-01-08 19:18:21 -08:00
Annika
2a54d9d82e
Chat monitor: Add ƞ to evasion regexes 2021-01-07 12:32:59 -08:00
Guangcong Luo
6b3a3070c9 Refactor team validator for readability
`checkLearnset` has been renamed `checkCanLearn`.

`reconcileLearnset` has been replaced with `validateMoves`, which
bundles the actual `checkCanLearn` calls with the old
`reconcileLearnset`, making for a better name.
2021-01-03 23:26:20 -08:00
zgeorgecsat
6c5a74c949
Mafia: Refactor for errorReply/requireGame (#7862)
* Changed to errorReply and requireGame whenever applicable/

* Use Chat.ErrorMessage in canJoin
2021-01-03 11:44:43 -08:00
PartMan
6597ef0f15
Add multi-hit as a parameter to /ms (#7855)
* Add multi-hit as a parameter to /ms

* Revert /help ds, add multihit to /help ms, fix TS

Code linted, let's go
'Tis coding at midnight
Save what had been tossed...
Bring back the older line...
The older line.

* ;-;

  1465 passing (25s)
  53 pending


> pokemon-showdown@0.11.4 posttest /home/partman/Documents/Code/pokemon-showdown
> npm run tsc


> pokemon-showdown@0.11.4 tsc /home/partman/Documents/Code/pokemon-showdown
> tsc


No idea why this wasn't caught.

* Fingers crossed
2021-01-03 11:42:27 -08:00
Guangcong Luo
ad656f67e4 Keep track of why moves can't be learned
The validator will now always know and be able to report exactly why
a move can't be learned, instead of sometimes not being able to figure
it out.
2021-01-03 09:53:04 -08:00
Plato
0731a47deb
Repeats: Fix private mod actions (#7865) 2021-01-01 14:07:16 -08:00
Kris Johnson
8b78eeb011 Fix HTML polls 2020-12-31 14:16:20 -07:00
Guangcong Luo
c44af3286d Implement Utils.forceWrap
I wrote a `forceWrap` method to support break-word wrapping in table
cells for scavengers, but apparently code blocks need it too, so I'm
moving it to Utils.

Fixes #7854
2020-12-30 17:41:41 -08:00
Instruct
e56d470671
Dexsearch: Add Strength Sap & Jungle Healing to list of recovery moves (#7851) 2020-12-30 02:29:59 +04:00
AeonicX7
2edfe301fd
Fix typo in /help battlesearch (#7852) 2020-12-29 14:16:32 -08:00
Kris Johnson
60cf560f9f
Repeats: Simplify code and fix bug (#7849)
* Repeats: Simplify display checks and fix bug

* Oops

* b
2020-12-29 03:57:18 -08:00
Mia
05295e356a
Modify uses of <youtube> tag to comply with API ToS (#7848) 2020-12-28 22:09:32 -08:00
Annika
3c0b07323d
Repeats: Use trusted text formatting
Requested by Kris; follows the precedent of roomfaqs
2020-12-28 21:56:01 -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
Annika
6d92ac8547
Repeats: Support non-time-based repeats (#7518) 2020-12-28 03:39:52 -08:00
Mia
2cca8bd48e
Support persisting polls and announcements (#7477) 2020-12-28 01:02:13 -08:00
Adam Tran
6702decd95
Add Pivot moves as a /ms category (#7822)
* draft test

* Move search for pivot moves
2020-12-26 21:57:03 -08:00
Instruct
5b441c2013
Super Staff Bros 4 (#7793)
Collaborative Project lead by @xInstruct with many contributors.

See the Special Thanks section of https://www.smogon.com/articles/super-staff-bros-4
2020-12-24 11:21:02 -05:00
Mia
981019e148
YouTube: Fix crash in interval (#7831) 2020-12-23 20:35:09 -08:00
Distrib
e8d0a8ec86
Improve /help daily (#7828) 2020-12-23 00:02:30 -08:00
Distrib
236aa0a1df
Hosts: Improve /help ipranges 2020-12-22 15:13:36 -08:00
Guangcong Luo
c13a9c84fb Improve /help poll 2020-12-21 21:26:51 -08:00
Distrib
393abfb056
Polls: Redesign help and add missing command (#7803) 2020-12-21 13:55:47 -08:00
Mia
e601a5eb1f
Suspect tests: Move functionality out of sim/ (#7769) 2020-12-21 13:32:19 +04:00
Mia
c12108fa72
Fix spinlock in /nomarkshared view (#7821) 2020-12-18 13:16:02 -08:00
Annika
42bd7cb8f5 Trivia: Remove deprecated sliceCategory function 2020-12-18 12:56:24 -08:00
fart
4e5e8c084b
Autoresponder: Fix bug with Refresh button (#7789)
* Fix Autoresponder Refresh button bug

Currently if you go into ``/autoresponder view`` and choose to view autoresponder Stats, it opens a menu where no date is specified and you can choose a date from there. If, however, you press the Refresh button (where no date is specified), it opens a new page called "view-autoresponder-room-stats-" (note the extra hyphen at the end). This is because the "refresh" function is called (on line 458) with [date], which would equal [""]. This is a truthy value, unlike [] and unlike "". This patch changes the conditional statement to look at the first item in the array's truthfulness - it is either an empty string (falsey) or a non-empty string (truthy) - instead of always being truthy.

* Fix failing test

* Fix failing test

Sorry if this isn't ideal, it's certainly not as elegant as it originally was.

* Update responder.ts

* Update responder.ts

* Update responder.ts
2020-12-16 12:33:38 -08:00
Annika
412ca7d5bb Mastermind: Fix timeout properly 2020-12-15 16:10:46 -08:00
Annika
290d520ea7 Mastermind: Highlight users on round start 2020-12-15 16:10:46 -08:00
Annika
e78fff3d47 Mastermind: Add a command to kick users 2020-12-15 16:10:46 -08:00
Annika
20bda5e548 Mastermind: Take all tied players to finals 2020-12-15 16:10:46 -08:00
Annika
721a48ea38 Trivia: Number submissions from 1 2020-12-15 12:00:10 -08:00
zgeorgecsat
5d4529ebcf
Mafia: Support submitting night actions through script (#7749)
* Allows players to submit idles through script

* Added suggestions

Co-authored-by: Student <Student@MacBook-Air-5.hsd1.il.comcast.net>
2020-12-15 14:45:30 +10:30
Annika
4c1f8bb491 Trivia: Fix bugs with adding questions 2020-12-14 18:48:35 -08:00
Annika
04418fee99 Trivia: Fix bug with Mastermind 2020-12-14 16:20:51 -08:00
Annika
dab1008448 Trivia: Fix bug in /trivia removeleaderboardentry 2020-12-14 15:07:50 -08:00
Annika
7f3afbc74f
Mastermind: Reduce intermission to 0.5 seconds
As per the original doc from Aegii (https://pastebin.pl/view/cf5113e5), which I misunderstood originally.
2020-12-14 14:46:40 -08:00
Annika
f2bfc82ca1
Chat monitor: Improve the handling of usernames (#7786)
* Chat monitor: Improve the handling of usernames

This PR ignores word boundaries in evasion regexes when filtering usernames, preventing the use of usernames with evasions of slurs in them.

* properly fix merge conflicts
2020-12-14 12:55:11 -08:00
Mia
755f930957
Add a page/command for viewing log access logs (#7794) 2020-12-14 01:38:56 -08:00
Annika
d742fbf1e4
Trivia: Use an Object for questions instead of a sorted array (#7800) 2020-12-13 23:17:10 -08:00
Mia
94fe9d838b
Fix userid search regexes for battlesearch/chatlog (#7801) 2020-12-13 23:12:14 -08:00
Annika
b7c3e6cff2 Chat monitor: Add Unicode support to regexes
This should fix the issues with the filter thinking that `🐺ℕ𝕚𝕟𝕖𝕥𝕒𝕝𝕖𝕤-𝔸𝕝𝕠𝕝𝕒🐺` was the T-slur.
2020-12-13 14:51:46 -08:00
Mia
14218b133d Youtube: Fix crash in /yt endwatch 2020-12-13 20:12:20 +00:00
Mia
ceb7bfab8b
Battlelog: Run search in PM (#7796) 2020-12-12 13:44:54 -08:00
Annika
37daf55014
Chatlog: Increase PM timeout to 1 hour 2020-12-11 20:47:09 -08:00
Mia
f9c4f8d4bc
Chatlog: Refactor FS/ripgrep handling and support battle logs (#7775) 2020-12-11 16:51:42 -08:00
Mia
3fb5f20321
Youtube: Track current video time in groupwatch (#7767) 2020-12-11 11:39:23 +04:00