Commit Graph

3926 Commits

Author SHA1 Message Date
Sergio Garcia
9a2c4739b0
Improve chatlog error message when disabled (#11173) 2025-06-03 15:22:54 -07:00
Sergio Garcia
a94972bbd2
Return the right error on /searchlog (#11174) 2025-06-03 15:20:28 -07:00
Lucas
de1d24e4eb
OMs: add Bad 'n Boosted data command (#11165)
* Add bnb command

* Update server/chat-plugins/othermetas.ts

---------

Co-authored-by: Meijer,L. (Lucas) <l.meijer6@students.uu.nl>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-06-02 01:21:20 -06:00
FeluciaPS
fa88abb5d6
Add /dm as a /pm alias (#11154) 2025-05-30 16:33:28 -07:00
Guangcong Luo
cd20be423f
Fix timer for mid-turn requests (#11127) 2025-05-28 17:07:41 -07:00
Guangcong Luo
66018a56b8 Fix ticket spacing 2025-05-28 16:30:30 -07:00
PartMan
4b2ac032d6
Pages: Notify bots when a user leaves a bot page (#11136) 2025-05-26 11:45:52 -07:00
Guangcong Luo
17f8fbc46a Unbold 5000 in auction help message 2025-05-25 18:58:33 -07:00
Sergio Garcia
b81ff9a69a
Remove useless spreads (#11132) 2025-05-24 16:19:48 -07:00
Guangcong Luo
e07080ce5c
Support fuzzy searching /dt etc (#11124)
This add's the teambuilder's fuzzy matching to /dt and similar commands.
2025-05-23 00:26:23 -07:00
dot-Comfey
8f57aa50bf
Help Tickets: Fix claim button text for text tickets (#10978)
Nitpick; the button to check out a text ticket shows as "Claim" when someone else is already looking at the ticket or it is already closed, which doesn't really make sense.
2025-05-22 13:11:46 -06:00
Guangcong Luo
df8a236c16 Teams: Hardcode no "Cathy" alias
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2025-05-19 19:21:44 -07:00
skymin3
a58e184872
Commands: Update help FAQ and improve !faq fails (#11118)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
https://www.smogon.com/forums/threads/clean-up-update-error-message-for-faq.3764560/ 
!faq fails no longer send the failed message message in chat, this is very helpful for room auth who are the users of broadcast commands
For whatever reason '!faq all' fails used a replybox? I can't think of a single non dev command that uses visible replyboxes in chat for fails, so changed this for an errorReply.
I cleaned up the wording of the /help faq, and I added some topics that were not there previously.
2025-05-19 01:18:28 -07:00
Lucas
5e9d392c28
Scavengers: Add Pointless twist (#11044) 2025-05-18 08:08:56 -07:00
pyuk-bot
0ee3291761
Teams: Automatically remove empty moveslots (#11119)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-17 21:36:44 -07:00
HoeenHero
7f4f4fe584 Timer: Properly detect first turn when automatically starting the timer
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-17 09:08:24 -04:00
Guangcong Luo
c5e63f84ab Fix crash when restarting with active Bo3
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-16 10:42:56 -07:00
Guangcong Luo
f13fe4495b Fix timer bug
nextRequest is no longer called on all players simultaneously,
meaning turnSecondsLeft might not be initialized when the timer starts.
2025-05-16 10:25:50 -07:00
Guangcong Luo
c5ef8ea3e5 Update timer for requests after updates
I figured PR #11105 would have some unintended side effect, but this
one isn't bad at all. There's no longer an easy way to tell whether
requests are move requests or not, but it's easy enough to instead
track the current turn.
2025-05-16 09:15:50 -07:00
skymin3
012b6716fb
Have invalid !rfaq fail over to !faq (#11096)
* !rfaq fail over to !faq 

Approved Suggestion: https://www.smogon.com/forums/threads/have-rfaq-fail-over-to-faq-if-a-match-is-not-found.3687458/ 

Code calls for RFAQ topics if that fails it checks the FAQ topic list. Sounds straightforward until you realize the faq broadcast fail command is archaic and for some reason the failed FAQ broadcast message still goes through on top of the actual faq error return message, along with the faq help, it's very messy I might just fix that next. This is bypassed by having the run broadcast call AFTER the topic is read as valid, so none of this nonsense can happen. I really thought this would be easy, turns out, not really (atleast for me).
2025-05-13 12:00:19 -07:00
Guangcong Luo
fe45b7d1bf Add |queryresponse|teamupdate| for /teams 2025-05-13 10:42:37 -07:00
skymin3
80c1460db8
Improve error messages shown to non-autoconfirmed (#11057)
https://www.smogon.com/forums/threads/improve-the-error-messages-shown-to-non-autoconfirmed-users-trying-to-access-certain-features.3737016/#post-10532853

A few of the non-autoconfirm error messages don't explain what autoconfirm means, which a new user likely doesn't know what autoconfirm is.
2025-05-13 09:12:52 -07:00
Kris Johnson
48d4a386b7 /roompromote: Fix punctuation on messages logged to staff room 2025-05-13 09:32:57 -06:00
Guangcong Luo
a7489f0995 Fix /removedaily with two args
Fixes #11103
2025-05-12 17:45:59 -07:00
shrianshChari
f2c7891775
UNO: Notify player if drawn card cannot be played (#11069) 2025-05-08 14:28:09 -07:00
Guangcong Luo
b979451e76 Fix uploading packed teams
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Packed teams weren't supported because `splitFirst` was called with
too high a limit. This fixes that.
2025-05-07 20:20:14 -07:00
Guangcong Luo
23c387f4a0 Add privacy to |queryresponse|teamupload|
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-07 19:45:01 -07:00
Mia
9a670548fa Teams: Account for OMs in validation 2025-05-07 20:14:52 -05:00
slainey
548f6911e9
Daily Spotlight: Add Delete button in list page (#11065)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-06 22:07:38 -07:00
Guangcong Luo
42d52e36e0 Refactor spotlights
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Fix /removedaily, adding a new "all" option to work like it's
documented to work, and fix the documentation.

Also remove support for legacy image format. A lot of functions were
async that didn't need to be.

Also remove an entirely unused sorting pass mistakenly introduced in
11ab3d83f8
(The queue was sorted, then immediately ignored to iterate it by index,
which is for the best, because showing the queue in any order other
than queue order is not useful.)
2025-05-05 07:05:59 -07:00
Guangcong Luo
a1e9066f9e Use class="details" and class="gray" 2025-05-05 04:43:05 -07:00
Karthik Bandagonda
6d7778167d
Auctions: Auto create players when using assignplayer (#11085)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-03 11:41:24 -05:00
HiZo
e7c5f126da
Teams: Sanitize OM Nicknames (#11068)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2025-04-27 20:51:10 -07:00
Mia
f2290ced37 Teams: Improve note on sharing teams onsite vs offsite
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-27 13:07:32 -05:00
TomOfTomKat
78bd34e2d9
Info: Update /smogonintro links (#11058)
Removed outdated links in /smogoninfo and replaced them with up to date ones:

https://www.smogon.com/forums/threads/introduction-to-smogon.3710821/
https://www.smogon.com/forums/threads/smogon-discord-server-directory.3652546/
2025-04-25 21:13:24 -06:00
TomOfTomKat
f86f08cb9a
Info: Update /tier (#11062)
Replace outdated (like, since XY outdated) links with current links.

I don't *love* dumping users at the Smogon Metagames forum, but there is no where else I am aware of that has all of our formats listed out.

Also updated the description to explain how /tier works and explain what type of information it contains.
2025-04-25 20:59:09 -06:00
slainey
6d455ab03e
Moderation: Clarify duration of default roombans (#11046)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
https://www.smogon.com/forums/threads/clarification-on-how-long-a-ban-lasts.3761482/ 

2 day bans do not say the amount of time which can be confusing to new users as they think a room ban is permanent. This commit does so without influencing week room ban text logs which already do note the 1 week time limit. This is an approved suggestion on the forums as well.
2025-04-24 07:05:13 -07:00
WifiLatency
9c1457ee9b
/ds: Collapsibles New Styling (#11041)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-04-21 05:07:44 -07:00
Kris Johnson
793fee5467 GitHub: Send HTML boxes through /raw 2025-04-20 23:40:13 -06:00
Marty-D
535657e766
Add new avatars
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2025-04-18 18:03:29 -04:00
Guangcong Luo
57380ae0b5 Redesign Smogtours plugin
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-17 21:02:00 -07:00
Alex "Mathy
d249e388e4
FFA/Multi: Fix simultaneous timeouts (#10311)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-17 20:47:39 -05:00
Alex "Mathy
6793b8a6ab
Fix timer not ending when player uses /leavegame (#11035) 2025-04-17 20:47:14 -05:00
Guangcong Luo
cc1f5c043f Redesign /tours
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-17 04:26:58 +00:00
Kris Johnson
a251474697 /tours: Remove `target="_blank" from room URLs 2025-04-16 21:21:26 -06:00
Kris Johnson
71f784c180 Tournaments: Make /tours usable in PMs/console 2025-04-16 21:03:51 -06:00
Lucas
32f62518f7
Mafia: Allow playercap to be changed as long as the game has not started (#11033)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-16 17:28:24 -04:00
Aurastic
777ce4d38a
Increase /addhtmlfaq character limit 8192 to 10000 (#11032) 2025-04-16 13:24:08 -07:00
Mia
77d0732af3 Chat: Add clarifying message to pages that require logins 2025-04-16 13:13:02 -05:00
Kris Johnson
ed9764bc23
Convert SSB and Rands Winrate chat plugins to tsx (#11030)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-15 13:37:41 -06:00
Sergio Garcia
fc23103de1
Fix random typos (#11020)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-13 23:59:36 -07:00
Guangcong Luo
14ec078746 Fix battles sending requests after they're over 2025-04-12 17:33:38 -07:00
Mia
0f8a31252b Teams: Link to the new website in more places
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2025-04-09 19:32:00 -05:00
Mia
0cd19ed250 Teams: Correct shareable link display 2025-04-09 19:29:17 -05:00
Mia
d758c21c64 Teams: Add static shortlinks to display page 2025-04-09 19:27:33 -05:00
Mia
ae542f3e0c Teams: Allow items/abilities/types as set nicknames
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
For OMs.
2025-04-09 11:48:49 -05:00
WifiLatency
c4a5ed50e4
/ds: Param to expand collapsible datasearches by default (#11023)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
* Reimplement all as a param to automatically expand nonbroadcast results.

* Tests ensuring datasearches don't expand when broadcast with all
2025-04-08 23:53:40 -06:00
WifiLatency
7d989abe8e
/ds: Add comparing stats (#10984)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
* Add comparing stats

* Fix duplicate comparison overwriting and error feedback

* Error on duplicates, invalid ranges, and muliple inequality operators

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-04-07 21:23:40 -06:00
WifiLatency
81b3471cae
Datasearch: Make results collapsible (#10995)
* Make ds collapsible

* Make other search commands collapsible.

* Remove all as a parameter for searches

* use readmore element with content attrs defined

* Rework to support chrome due to details linebreak quirk

* Move the toggle button down to the results line for broadcast commands
2025-04-07 21:19:47 -06:00
Kris Johnson
9ff1398c69
Use Chat.ErrorMessage instead of errorReply in more places (#11017) 2025-04-07 21:15:27 -06:00
Mia
291636a807 Suspects: Relax URL requirement
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Smogon generates the URLs now.
2025-04-05 23:22:02 -05:00
Guangcong Luo
7979ef12cc Allow Hangul in names
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-02 16:44:06 -07:00
Mia
1a9d691493 Youtube: Update roomid references in groupwatch list 2025-04-02 16:21:08 -05:00
Alex "Mathy
9ba3752d50
Dexsearch: Allow sorting by Pokedex number (#11001)
* Dexsearch: Allow sorting by Pokedex number

* fix whitespace
2025-04-01 00:17:47 -06:00
Mia
dd5c134603 Fix build
I'm going to set something on fire.
2025-03-31 18:45:37 -05:00
Mia
ef5ea9f0ff Chatlog: Fix searching linecounts for deleted rooms 2025-03-31 18:34:26 -05:00
Mia
5383667f2c Chatlog: Allow searching linecounts for deleted rooms 2025-03-31 18:28:44 -05:00
Mia
3dd18fdfa5 Chatlog: Don't check filesystem for database log searches 2025-03-31 18:22:16 -05:00
Mia
d7bfa16a36 Youtube: Update roomid 2025-03-31 12:57:38 -05:00
WifiLatency
bdeb19f26a
/ds: Add rule functionality (#10973)
* /ds metagame rules with moves compability.

* mon attributes compatibility

* pokedex rule compatibility.

* clean up. support convergencelegality

* updated dexsearchhelp. better error feedback.

* Fix negations for abilities and moves.

* Scrapped convergence, cleanup.

* Updated dshelp for the mapped rule param values.

* Fixed duplicate formes and tests reciving species.

* Support /ds stacking multiple rules

* Apply suggestions from code review

* tests for /ds rule functionality

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-03-18 00:50:32 -06:00
WifiLatency
7279f81cc3
Allow users to broadcast !avatar (#10961)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
* command properly functions when duplicated but cant broadcast with the normal name.

* Prevent users from providing no argument.

* Removed extraneous null check and ternary assignment.

* Remove extraneous newline.

* Update server/chat-commands/avatars.tsx

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-03-14 13:55:56 -06:00
WifiLatency
232af5c19f
/ds: Fix searching for trapping and partial trapping moves (#10962)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
* Adds trap as a search param to movesearch without modifying any moves.

* minor regex optimization.

* Implement in a less hacky manner.

* clean up adding both trapping statuses to the orgroup.

* Fixed conditional mixing trapped moves with other volatilestatuses.
2025-03-11 14:39:50 -06:00
WifiLatency
4346e3d34c
Add Restricted as a /ds Parameter (#10952)
* added restricted as a param for /ds using the species tags.

* comply with max line length.
2025-03-09 12:03:15 -06:00
WifiLatency
7bf04ad1e1
Implement searching for tiers by inequality to /ds (#10949)
* Implemented tier searching using inequalities.

* Fixed the value of OU being higher than CAP.

* Fixed AND searching for tiers with inequalities.

* Update server/chat-plugins/datasearch.ts

* Update server/chat-plugins/datasearch.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-03-09 12:03:06 -06:00
WifiLatency
f1ba8179c0
Add Number Generation Aliases to /learn (#10955)
* learn command generation shorthand now matches other datasearch commands.

* Retain support for generational prefixes.
2025-03-09 12:00:02 -06:00
pyuk-bot
ae626838bf
CGT: Fix level history page (#10930)
* CGT: Fix level history viewer

* More efficiently iterate the array in reverse
2025-03-09 11:53:20 -06:00
Distrib
18ca337e13
Helptickets: Fix user profile links with spaces (#10951) 2025-03-09 11:43:53 -06:00
Guangcong Luo
99ea179aaa Minor optimizations 2025-03-06 16:53:54 -08:00
Guangcong Luo
d9557375a0
Introduce "NatDex Mod" (#10939)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
"Standard NatDex" is very weird compared to how OMs usually work.

See "TierShift Mod" and "Godly Gift Mod". NatDex now gets its own mod,
which can be mixed into any other format, instead of needing to start
with NatDex.

This would make Min Source Gen overriding annoying, so it now defaults
to the current gen in Gen 9+, if Obtainable is set and +Past isn't. So
now you don't need to manually set Min Source Gen to enforce Obtainable
in Gen 9.
2025-03-06 03:40:36 -08:00
Syrinix
94f049ce19
Update /faq lostpassword (#10944)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
We are no longer doing password resets.
2025-03-05 04:59:58 -08:00
Guangcong Luo
74aa072bfb Fix /formathelp for past-gen formats
NatDex Mod refactor caught a bug. `format.gen` isn't meaningful.

...maybe it should be... Main concern would be perf impact, to load
all the datamods to get their gen. Probably not worth it?
2025-03-03 04:06:20 -08:00
Guangcong Luo
719bc1a87f Fix crash when leaving UNO game
Fixes #10821
2025-03-01 03:11:51 -08:00
Mia
2a88d42831 Seasons: Properly prioritize current format badge
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2025-02-27 18:14:25 -06:00
Mia
21b368a88f Users: Enforce ip-based punishments after rename as well as on login
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-02-27 14:05:39 -06:00
Guangcong Luo
1d417b4399 Update CONTRIBUTING.md
We no longer use sucrase, also some minor stuff.
2025-02-26 16:40:45 -08:00
Guangcong Luo
15c82dc327 Remove sucrase workaround 2025-02-26 16:13:32 -08:00
Guangcong Luo
73a04cdcba TypeScript: Enable noImplicitOverride
Some checks are pending
Publish to npm / test (push) Waiting to run
Publish to npm / get-version (push) Waiting to run
Publish to npm / npm-publish (push) Blocked by required conditions
Node.js CI / build (18.x) (push) Waiting to run
2025-02-26 14:38:32 -08:00
pyuk-bot
f03dbef9ff
CGT: Add command to view winrates + misc. updates (#10917)
* CGT: Add command to view winrates + misc. updates

* Update data/cg-team-data.ts

* Update data/cg-teams.ts

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-02-26 14:55:43 -07:00
Guangcong Luo
e25bec3620 Remove some implicit conversions
boolean -> number and number -> string should be explicit. Probably
string -> number should be, too, but I'm not ready to turn on the lint
option yet.

This was supposed to be part of the big ESLint refactor but I forgot
to push it. <_<
2025-02-25 22:55:01 -08:00
Guangcong Luo
78439b4a02
Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
Mia
51f1d6e4ca Info: Update badge faq link
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2025-02-17 14:38:03 -06:00
pyuk-bot
9f58961dd3
CGT: Track wins/losses for level 100 Pokemon (#10909)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2025-02-16 00:40:12 -07:00
pyuk-bot
e97ea8c7fd
CGT: Count wins/losses in public-room tour-battles (#9999) 2025-02-09 23:34:45 -06:00
Mia
5a8b8465ff Repeats: Disallow use in personal rooms 2025-02-09 20:56:37 -06:00
Kris Johnson
355f6b00f4 Mix and Mega: Fix some validation
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2025-02-03 23:38:17 -07:00
Kris Johnson
3281f6adb0
Mix and Mega: Expand usable items (#10865)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2025-02-03 19:18:22 -07:00
Mia
448272b16f Core: Fix /help for namespaces / private namespaces
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2025-02-02 13:46:27 -06:00
pyuk-bot
7bb2fd1869
Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
Mia
ec1c909e3c Fix typo 2025-01-28 14:35:23 -06:00
Mia
46800084b9 Chat: Ensure 'does not exist' messages don't leak private commands
A private command table named /foo - say, with /foo bar and /foo baz - would leak its existence when /foo is used, reporting back that the command '/foo ' does not exist - whereas a nonexistent command would not have the trailing space.
2025-01-28 14:31:06 -06:00
Mia
5cac4ed3e7 Core: Ensure /help doesn't leak private commands with incorrect 'does not exist' messages 2025-01-28 14:28:04 -06:00
Mia
efadd59f6d Fix typo
Got unstaged while I was fixing some replays spacing issues that got automatically generated. Boo.
2025-01-28 14:01:21 -06:00
Mia
44718bb847 Stop using Math.random in more critical spots 2025-01-28 14:00:15 -06:00
Karthik Bandagonda
c8bc6be7be
Auctions: Remove formatted bid messages + only send errors on bids to the bidder (#10813) 2025-01-09 23:04:33 -07:00
Karthik Bandagonda
a4c3528ef2
Auctions: Fix addplayer command + styling changes (#10795)
* Auctions: Fix addplayer command

* hijack pr for styling changes

* minor formatting change

* Add team name column to overall pricelist

* Add support for max players

* Don't send bid error messages to everyone

* Remove tiers hover text, add hover text of entire draft list when hovering over a teams player list
2025-01-09 22:56:49 -07:00
motogp-bit
4cca6dd174
Mafia: Add tracking of N0 actions. (#10771)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2025-01-08 18:09:45 -05:00
Dirain1700
eb935a4aca
Tournaments: Hide toolbox if opponents get DQed (#10769) 2025-01-04 13:16:02 -07:00
dot-Comfey
69eac3893e
Trivia: Fix crash and Number mode game cap (#10753)
* Trivia: Fix crash and Number mode game cap

Discussed with Trivia auth.

Fixes an issue in Number mode where the game fails to end after a specified amount of questions, and fixes a crash caused by ending a game with no participation

* Update server/chat-plugins/trivia/trivia.ts

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-01-04 13:15:05 -07:00
larry-the-table-guy
b790eb8309
Remove dead code for dex initialization (#10793)
As of PR #10641, these are no longer necessary.
2025-01-04 13:14:22 -07:00
aQrator
d8689df5d0
Update /scavhelp staff to include /scav sethostpoints (#10788)
Purely textual change to help find commands for the scav room
2025-01-04 13:13:43 -07:00
Dieter Reinert
31934d775f
Calculator: Fix base prefix logic for zero results (#10778)
Previously, `/calculate` would fail to include the correct base prefix (`0x`, `0b`, `0o`) when the result was `0` because the code used a falsy check (`if (result)`). This commit replaces that condition with `if (Number.isFinite(result))`, ensuring zero is properly displayed in the requested base.
2025-01-04 13:13:31 -07:00
Karthik Bandagonda
d0e1b686f4
Auctions: Add Tiers Not Played + changes to bidding (#10787)
* Auctions: Add Tiers Not Played + changes to bidding

* Update server/chat-plugins/auction.ts

* Update server/chat-plugins/auction.ts

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-01-04 12:29:55 -07:00
Marty-D
98bd633e1b
Add new avatars
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2025-01-02 17:54:05 -05:00
Dieter Reinert
d0152f53b4
Roomlogs: Retry on transient DB connection Errors (#10776)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-12-30 20:55:48 -06:00
Mia
82ea5a4ce6 Helptickets: Add 'reported user' modlog button to Inap Pokemon Names tickets 2024-12-30 20:35:36 -06:00
Mia
9fb12ba78c Helptickets: Make reported usernames clickable 2024-12-30 20:27:33 -06:00
Mia
432a62b095 Chatlog: Trim querystrings from /gbc 2024-12-30 20:24:49 -06:00
Mia
dc2f40f5d8 Moderation: Automatically /allowname unnamelocked names 2024-12-30 20:19:35 -06:00
Mia
e026a368b6 Moderation: Ensure unnamelocks are modlogged properly 2024-12-30 20:19:15 -06:00
Mia
37a789ffd3 Helptickets: Add /am edithistory to the staffintro of chat tickets 2024-12-30 20:17:13 -06:00
Mia
558245b2d4 Seasons: Show the correct formats for old season records
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-12-28 19:59:33 -06:00
Mia
397b68c2a4 Fix typo
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-12-24 12:00:38 -06:00
Mia
7e8b7a02d4 Artemis: Stop throwing 429 errors
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
We already throttle requests when we get 429s. We don't need to log it constantly too.
2024-12-24 02:01:51 -06:00
larry-the-table-guy
ab5f71338f
BattleSearch: Replace lookahead with union (#10679)
PCRE lookahead was causing the regex to be pathologically slow.
2024-12-16 22:31:42 -06:00
bingingem
602e1d872f
/weakness: Add fuzzy matching (#10316)
* Weakness: add fuzzy matching to command

* fix linting errors

* removing `any` so TypeScript infers typing

* merge master branch properly

* push each species type individually instead  of string array
2024-12-16 22:30:54 -06:00
Mia
d64d709ace Abuse-monitor: Fix crash 2024-12-16 22:10:22 -06:00
Kris Johnson
e717e55be9 Fix permissions
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-12-14 18:14:34 -07:00
Kris Johnson
83ee087d73 last.fm: Add command to toggle YouTube API 2024-12-14 18:13:58 -07:00
Kris Johnson
7ae58f81d6 Mix and Mega: Fix exploit with Pokemon using their native mega stones
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-12-13 14:48:39 -07:00
HiZo
443339937f
Mix and Mega: Use decimeters to prevent rounding (#10750) 2024-12-13 09:19:53 -07:00
Kris Johnson
2b03102954 Mix and Mega: Make Aggronite great again 2024-12-12 11:07:52 -07:00
PartMan
8563a5658f
Datasearch: Don't escape HTML for regular text messages (#10692) 2024-11-27 13:15:53 -07:00
livid washed
b107d77f5c
Implement [Gen 9] Battle Factory (#10689)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
* Implement Gen 9 Battle Factory

* Make OU mons female when possible for Cute Charm Enamorus

* delete yanmega

* Update data/random-battles/gen9/teams.ts

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Apply more suggestions from code review

* Simplify two lines

---------

Co-authored-by: ACakeWearingAHat <45981036+ACakeWearingAHat@users.noreply.github.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-11-26 10:12:39 -07:00
Lucas
e315582326
Scavs: Add a command to forcibly queue hunts (#10650)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-25 06:21:38 -08:00
Alex "Mathy
067d99d4dd
Chat: Actually prevent unmatched square brackets (#10691)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-11-23 13:10:33 -07:00
Karthik Bandagonda
0d0d110483
Auctions: Fix reference to enabling blind mode in help text (#10688) 2024-11-21 19:36:45 -06:00
dot-Comfey
340d1e8822
Update documentation of several commands (#10659)
Changes documentation of several commands to reflect the actual groups that can use the command.
2024-11-18 15:21:27 -07:00
Scott Maxwell
7d463fed5c
Fix invalid leave messages being sent on logout (#10622) 2024-11-18 15:18:10 -07:00
Alex "Mathy
7a8ebe8155
Chat: Don't allow unmatched square brackets in hyperlinks (#10681) 2024-11-18 15:17:58 -07:00
HiZo
c42a9b208b
Coverage: Remove crash on uncommon multipliers (#10678) 2024-11-18 15:13:45 -07:00
Kris Johnson
512e3be804 Data commands: Gate Gigantamax information to Gen 8
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-16 21:28:26 -07:00
Mia
58fbb2d750 Suspects: Fix typo
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-11-15 13:12:47 -06:00
Mia
b5b7e8e69c Suspects: Allow setting COIL B values in /suspects add 2024-11-13 11:15:35 -06:00
Abhishek Singh
4cece4ee98
Upgrade node version readme and package.json (#10672)
Some checks failed
Node.js CI / build (16.x) (push) Waiting to run
Publish to npm / test (push) Has been cancelled
Publish to npm / get-version (push) Has been cancelled
Publish to npm / npm-publish (push) Has been cancelled
2024-11-12 03:32:09 -08:00
Kris Johnson
30f22d29fb
/suspects: Rename setcoil (#10667)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
* `/suspects`: Rework setcoil

* Clean up more strings

* More aliases
2024-11-10 20:43:30 -07:00
shrianshChari
57b65e03a8
/modnotehelp: Add more options (#10670)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-10 18:38:36 -06:00
PartMan
6dec39e428
Commands: Allow sending HTML pages to multiple users simultaneously (#10654) 2024-11-10 09:47:43 -08:00
Alex "Mathy
073db5ee38
Never force challenge battles public (#10664)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-09 19:11:29 -08:00
Kris Johnson
6d7f9757c1 /linksmogon: Fix typos
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-09 11:25:13 -07:00
Alex "Mathy
9a764bad35
/dt: Differentiate "User's Team" target moves (#10665) 2024-11-08 09:37:48 -08:00
Mia
6cc374e0e8 /linksmogon: Send URL in command feedback in case page doesn't open
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-05 14:08:42 -06:00
urkerab
9f29c90db2
Handle 25 hour days correctly (#10635)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-02 22:45:34 -05:00
Mia
a4f42d48c0 Suspects: don't strip periods from req data
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-01 21:10:27 -05:00
Mia
89dd113910 Suspects: Use suspects/edit action where applicable 2024-11-01 19:34:31 -05:00
Kris Johnson
b37edb2af5 Fix commands that have optional format args
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-11-01 11:41:01 -06:00
Slayer95
34c0cb39e3
Fix bugs connected to format.exists (#10647) 2024-10-31 08:25:17 -05:00
Sergio Garcia
a3f510e75a
Fix typo in linecount (#10642)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-10-29 07:39:29 -05:00
Mia
8f868a12cd Suspects: Allow editing reqs on existing test 2024-10-27 17:26:05 -05:00
Mia
e98a544553 Suspects: Don't re-send suspect-create on test edit 2024-10-27 16:34:01 -05:00
Mia
d0c96f8907 Add /suspects verify 2024-10-27 16:15:18 -05:00
Mia
7251aad239 Fix typo
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-10-24 08:52:45 -05:00
Mia
5bec49f7a0 Suspects: Fix loginserver error handling 2024-10-24 08:49:28 -05:00
Mia
8f91863968 Suspects: POST url to Smogon on test start 2024-10-24 08:11:35 -05:00
Mia
1079ec910d Fx typo 2024-10-22 14:14:48 -05:00
Mia
db9ea17174 Suspects: Add support for new verification procedure 2024-10-22 11:33:59 -05:00
PartMan
72113589ec
Scavengers: Normalize answers before checking (#10623)
(eg: Pokémon -> pokemon)
2024-10-18 20:42:04 -06:00
Karthik Bandagonda
9d473d136c
Auctions: Fix nom timer not getting reset after an undo (#10610)
* Auctions: Fix nom timer not getting reset after an undo

* Use functions to actually prevent crashes from ever happening
2024-10-12 18:40:08 -06:00
Kris Johnson
4ed5c3abb9
/setodds: Fix iterating through moves 2024-10-08 23:01:58 -06:00
Mia
b7ec38d650 Fix typo
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
didn't go through due to local lag, oops
2024-10-08 20:34:59 -05:00
Mia
a027073d28 Suspects: Don't toID() COIL B values 2024-10-08 20:34:36 -05:00
Kris Johnson
abacd29808 Remove Gen-NEXT
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-10-06 11:02:54 -06:00
Sergio Garcia
a0a6fed454
Fix oversights in & to ~ migration (#10595)
* Fix oversights in & to ~ migration

* It was just a symbol
2024-10-06 10:07:03 -06:00
Vinayak-Shukla
b8eeebcbb3
Scavengers: Fix time trial sorting (#10356)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2024-10-03 09:02:06 -04:00
Kris Johnson
df5c46bb53 Remove the Section Leader rank 2024-10-01 21:27:49 -06:00
Kris Johnson
6a1df16825
Fix /bulbapedia help 2024-10-01 21:12:29 -06:00
Kris Johnson
56b46e6b37 Remove /veekun, add /bulbapedia 2024-10-01 18:40:48 -06:00
Mia
747326f277 Fix a few more missed &s 2024-10-01 09:33:47 -05:00
Mia
8c290a453e Fix some missed replacements 2024-10-01 09:30:23 -05:00
Mia
e82c5fa161 Change references of & to ~ 2024-10-01 09:02:03 -05:00
Karthik Bandagonda
b7a39748ba
Auctions: Send nomination notification to managers only (#10587)
* Auctions: Send nomination notification to managers only

* Update server/chat-plugins/auction.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-09-30 17:32:15 -06:00
Karthik Bandagonda
4ba7f6e8fc
Use value rules for timer (#10194)
* Use value rules for timer

* lint

* fix rule overrides

* fix the "boolean" value rules

* add limits for number based rules

* Realized that you don't need boolean value rules

* oops

* fix checks for lower bounds
2024-09-29 19:10:49 -06:00
Mia
f06c71b36a Add more feedback to /linksmogon
Loginserver requests are a tad slow. Don't like leaving it to hang with no response.
2024-09-29 18:53:55 -05:00
Mia
a284f35d6c Add a command for linking smogon and PS accounts 2024-09-29 18:51:01 -05:00
dot-Comfey
6c29c905da
Fix prevo/evo move incompatibilities (#10574) 2024-09-26 20:22:11 -05:00
Leonard Craft III
8ac3035eb2 Fix private forpunishment replays from regenerating new passwords 2024-09-25 20:01:19 -05:00
KingNeodude
63968d011d
Update slowchat help (#10565) 2024-09-22 13:26:45 -05:00
Distrib
d2a537ac3e
Helptickets: Add link to reported user's profile (#10550) 2024-09-17 20:44:49 -05:00
dot-Comfey
08e88a160d
Add mass invites (#10519) 2024-09-17 20:43:38 -05:00
larry-the-table-guy
ddf5848a38
Datasearch: Optimize runDexsearch (#10536)
* add crude profiling to runDexSearch

No behavioral changes (other than console.log spam), this commit is just to establish a baseline and pinpoint the slow portions

* optimize datasearch.ts - pull move filter prep out of loop

Based on preliminary benchmarks, most of the time was spent getting the move validator, even for queries that don't specify a move.
More importantly, the parameters for fetching the move validator are known very early in the function and don't change during the loop.
Pulling that portion out of the loop is an easy win.

* improve profiling for runDexSearch

- add subcategories for filtering on move (the next optimization target)
- report unaccounted time amounts ('known unknowns')
- make grand total stand out more

* optimize dexsearch - fetch move list in outer loop

Move list depends on 'alts', which does not change in the loop over mons. Minor win, but simple.

* optimize dexsearch - filter move list by gen in outer loop

Neither 'mod' nor 'altMoves' changes during the inner loop.

* log pokemonSource in runDexSearch - expose possible leak

pokemonSources, which appears to act as a set, grows with each iteration, adding seemingly redundant items.
Will need to look closely at TeamValidator to identify the problem. My guess is that it's putting object references into a Set,
which, for objects other than strings, only cares about object identity.

* profile runDexSearch - count checkCanLearn calls

Also, semi-fix issue identified in prior commit - the endless growth of the restrictiveMoves list.
Counting the calls to checkCanLearn helps us reason about whether the cost per call is reasonable.

* fix perf bug in TeamValidator.checkCanLearn

use the cached ruleTable, save 100x.

* optimize runDexSearch - only init move filters when needed

For queries that never mention a move, a considerable chunk of time is wasted getting the objects needed for
'checkCanLearn'. I measure ~1ms savings for the relevant queries, which is often a decent percentage.

* profile dexsearch - delete and format

This is to document that they are not the bottlenecks.

* remove nested profiling from dexsearch

We've gotten to the point where we actually *are* measuring microseconds, so the frequent calls
are too expensive. This is a good problem to have! What we can see from running npm test is
that 'filters' and 'unaccounted' still account for a majority of the time. So, there's still
room for improvement, if that's ever a serious concern.
Personally, I think working on the moves API would be more fruitful.

* remove all profiling code

No more console.log or performance.now() calls. Ready to merge.

* Update server/chat-plugins/datasearch.ts

Format the 'format' string in-line.

Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>

* Remove ts-expect-error from datasearch.ts

* Fix uninit lint in runDexSearch

---------

Co-authored-by: Mia <49593536+mia-pi-git@users.noreply.github.com>
2024-09-17 11:46:35 -06:00
adrivrie
247c2aa70a
Random typo fixes (#10556) 2024-09-17 08:09:48 -05:00
Mia
4731f1283d Helptickets: Prevent unregistered users from submitting IP-Appeals 2024-09-12 21:40:33 -05:00
Karthik Bandagonda
b2baca4fd5
Auctions: Remove credits column in snake draft (#10545)
* Auctions: Remove credits column in snake draft

* Update server/chat-plugins/auction.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-09-12 15:36:40 -06:00
Karthik Bandagonda
18eb7d5be5
Auctions: Add support for snake draft (#10526) 2024-09-05 20:00:04 -05:00
Karthik Bandagonda
67354c8f3d
Run updatesearch after changing privacy of game room (#10529) 2024-09-02 15:23:22 -05:00
Mia
fb38517c27 Chat: Stop enforcing room banwords on usernames/statuses 2024-09-01 16:29:37 -05:00
Mia
abf66be9df /show: Remove extraneous button while broadcasting
This isn't really necessary, was only ever a stopgap. We have an actual code fix for it now, so it's fine.
2024-08-31 13:59:23 -05:00
Mia
0af0886121 Remove unnecessary break statement 2024-08-30 00:37:37 -05:00
Mia
cefac5f255 Punishments: Remove stopgap patch 2024-08-30 00:17:47 -05:00
Mia
b487ee646c Punishments: Properly cull duplicated punishments from the PunishmentMap arrays
Splicing an array while you're for-of looping that array is bad, kids.
2024-08-30 00:10:27 -05:00
Mia
5d49882565 Punishments: Ensure duplicated punishments are properly erased 2024-08-29 23:48:47 -05:00