Commit Graph

2896 Commits

Author SHA1 Message Date
Guangcong Luo
c2a35ff868 Optimize getIdentityWithStatus
Most of the return value is never used.

(Also fix bug with statuses containing `,`)
2019-07-15 12:33:21 -05:00
whales
82a666cc0e Fix tour format reporting (#5609) 2019-07-15 11:22:13 -05:00
whales
551bc33b30 Stop status desyncing when joining rooms or renaming (#5608) 2019-07-15 10:12:23 -05:00
Guangcong Luo
b7e94c1da3 Fix crashes in chat commands 2019-07-15 10:58:09 -04:00
whales
257cea4d62 Fix status in userdetails (#5607) 2019-07-15 09:56:40 -05:00
whales
8ad6c9246f Don't report name after forcerename for namelocked users (#5583) 2019-07-15 00:57:29 -05:00
Guangcong Luo
22ca01123d Refactor tournaments for better prop names
- `tour.originalFormat` -> `tour.baseFormat`
- `tour.teambuilderFormat` -> `tour.fullFormat`

These should better reflect what they actually mean.
2019-07-15 00:35:31 -05:00
whales
9147863403 Tournaments: Support replacing players (#5600) 2019-07-15 00:07:37 -05:00
whales
e918287cd6 Allow starting tournaments with a custom name (#5604) 2019-07-15 00:04:49 -05:00
Guangcong Luo
cb858bce1b Add sonic.net to residential ISP list 2019-07-15 00:23:07 -04:00
Guangcong Luo
a2f9a9191e Add 'ok' to Help tickets content-free message list 2019-07-15 00:23:07 -04:00
Guangcong Luo
315dd3999f Disallow ties before turn 100 2019-07-15 00:23:07 -04:00
HoeenHero
2677443ba4 Prevent users from being added to battles they are already in 2019-07-14 23:57:54 -04:00
Kirk Scheibelhut
951c582fe3 Add support to local /laddertop for restricting by user prefix (#5606) 2019-07-14 22:25:35 -05:00
Marty-D
80da1aa377
IPTools: Update proxy lists 2019-07-14 21:29:53 -04:00
Bär Halberkamp
49d4b5abd2 Refactor statuses into statusType and userMessage (#5597)
(and improve persistence)
2019-07-14 20:22:02 -05:00
TheJetOU
3c8b4f6872 Tournaments: Fix crash in /tournament cap (#5605)
`note` in this.modlog expects a string.
2019-07-14 17:46:39 -04:00
Guangcong Luo
56565e9d21 Support treating a rank as another rank in battles
This adds a Config setting, `globalGroupInPersonalRoom`, which will
just straight-up let global drivers act as mods in battles and
groupchats.

Fixes #5564
2019-07-14 01:33:58 -05:00
HoeenHero
b4f95342a4 Properly handle multiline modlog messages 2019-07-13 11:09:32 -04:00
Guangcong Luo
2f15e1559c Add documentation for /adddatacenters 2019-07-12 23:52:34 -05:00
Ben Davies
ed4b97a110 Allow bots to set statuses in the global room (#5596)
This makes it easier to automatically set the status on connect. Instead
of making it so users can't set their status if they can't talk at all,
make it so they can't set it if they're locked or semilocked.
2019-07-12 16:43:55 -05:00
whales
934a6cd246 Mafia: Implement silences (#5584) 2019-07-12 07:40:22 -04:00
Guangcong Luo
f8c06f9ef7 Require <style>/<script> tags to be closed 2019-07-11 04:24:14 -05:00
TheJetOU
ade29349c6 Send Elo rating in rated battles (#5595) 2019-07-11 02:38:49 -05:00
TheJetOU
0663bb66d0 Refactor punishments (#5599)
- splits `keys` into `userids` and `ips`
- explicitly lists the `reason` and `expireTime` columns in functions that don't use them
2019-07-09 18:36:50 -05:00
Ben Davies
d4c479686c Use dns.lookup over dns.resolve4 in IPTools.dnsblQuery
This helps prevent DNS poisoning attacks if the platform supports DNSSEC
since dns.resolve4 uses c-ares, which doesn't support DNSSEC.
2019-07-08 21:39:44 -03:00
whales
729144606e Prevent /groupchatuptime from being used without a room (#5592) 2019-07-06 14:24:33 -05:00
whales
2ad511fd24 Filter statuses properly (#5593) 2019-07-06 05:24:01 -05:00
Guangcong Luo
4d80d4b1a9 Use nicknamefilter for status messages
Namefilter is a complete mismatch for status messages, since names
have very specific requirements that don't apply to status messages.
Nicknames have no such restriction, and work basically the same as
status messages.
2019-07-06 03:49:46 -05:00
Ben Davies
dda24addcd Add a 15 second timeout when warning individual users (#5588)
It's possible to spam /warn in groupchats, preventing users from being
able to close the warn modal. This mitigates that by limiting the rate
you can warn a user to once every 15 seconds, which is longer than the
amount of time it takes for the warn modal to allow you to close it.
2019-07-05 14:08:30 -05:00
whales
25971c4096 Clarify /away error messages (#5587) 2019-07-05 02:01:16 -05:00
Jeremy Piemonte
8b761ab96a Back: Return an error message if user is back (#5586)
I did this command about 3 times thinking the server was lagging, but instead it wasn't sending a response.
2019-07-05 00:22:34 -05:00
Zyresus
f7d53e03ce Update domain blacklist (#5572) 2019-07-04 14:14:58 -07:00
whales
d6ded68606 Fix config modification for unit tests (#5585) 2019-07-03 21:38:02 -07:00
Kirk Scheibelhut
e85ebf2bcc Include player count in |tournament|start and /tour getusers (#5581) 2019-07-03 15:56:07 -07:00
Kirk Scheibelhut
ff911e2230 Fix crash in datasearch related to absent template.learnset
If a target doesn't exist the learnset won't either - stub out with
an empty learnset instead.
2019-07-03 09:16:04 -07:00
whales
67c5dc4c5b Check for obvious invalid statuses (#5577) 2019-07-02 22:05:36 -07:00
whales
c6af44d0ca Space clearstatus modlog entry properly (#5578) 2019-07-02 22:02:32 -07:00
TheJetOU
bff15e051e Don't show users in roomauth if they're away (#5575) 2019-07-02 14:37:27 -07:00
Bär Halberkamp
795dde17df Don't allow people with banwords in their status to talk 2019-07-02 22:37:52 +02:00
Bär Halberkamp
801e4e21fc Away users don't get hit by the idle timer 2019-07-02 22:15:05 +02:00
Bär Halberkamp
7b08090786 Idle -> (Idle) for consistency 2019-07-02 19:06:19 +02:00
whales
35a8eebce2 Various status improvements (#5573)
* Allow staff to clear statuses

* Check banwords in a better way

* Don't inline setstatus

* Handle an edge case when clearing statuses
2019-07-02 17:33:23 +02:00
HoeenHero
836fc71c00 Update /endlockdown and /crashfixed
Merged the commands together, and made them PM all users as well as post in all rooms just like /lockdown.
2019-07-02 11:21:50 -04:00
HoeenHero
607ecf3a2c Enable mafia by default
Recommended by @Zarel, shouldn't be disrupting to any rooms that don't want it.
2019-07-02 11:21:46 -04:00
HoeenHero
06a0b93e83 Escape HTML in ticket list 2019-07-02 11:21:42 -04:00
HoeenHero
864d2aaefa Fix bots bypassing the AFK timer 2019-07-02 11:21:37 -04:00
Bär Halberkamp
3bed11f2d6 Using /status while away or busy should preserve status type 2019-07-02 16:31:50 +02:00
Bär Halberkamp
18b0bd1396 Away: fix duplicate protocol message 2019-07-02 16:22:03 +02:00
whales
a8de9f999c Notify users when trying to use a banned status (#5571) 2019-07-02 15:04:04 +02:00
Bär Halberkamp
a84d495eff ACTUALLY pass forStatus to namefilter calls 2019-07-02 14:41:33 +02:00
Bär Halberkamp
1ca759b1c1 Fix one last place where statuses were cleared without that being a good thing 2019-07-02 14:36:53 +02:00
whales
6015b01d1b Fix typing on NameFilter (#5568)
* Fix typing on NameFilter

* actually fix properly lol
2019-07-02 14:33:04 +02:00
Bär Halberkamp
b912e9ec83 Don't spam staff room about status message abuse 2019-07-02 14:15:29 +02:00
Bär Halberkamp
ec3bfe8294 Fix /rules 2019-07-02 14:13:11 +02:00
Bär Halberkamp
48c9304a4a Fix a bug with clearing non-afk statuses 2019-07-02 13:58:30 +02:00
Spandan Punwatkar
eec921a474 Update Nature Swap (#5567) 2019-07-02 14:44:18 +04:00
Bär Halberkamp
89e0aa4c72 Add status commands to /help 2019-07-02 01:24:48 +02:00
Guangcong Luo
c5eeea2818 Fully fix double-elimination tournaments
(Also improve documentation of ElimNode)

PR #5509 was the correct direction, but it missed a spot.
2019-07-01 15:10:59 -07:00
Kirk Scheibelhut
a61c10eeb8
Remove hardcoded URLs in favor of Config.routes (#5557) 2019-07-01 10:19:21 -07:00
Kirk Scheibelhut
df083d7528 Remove Object.assign(function) pattern from TeamValidator{Async} 2019-07-01 08:20:51 -07:00
Kirk Scheibelhut
65aeec5c1d Change invite only modjoin from + -> % (#5562) 2019-06-30 18:21:22 -07:00
Guangcong Luo
64ae404da9 Lock (don't ban) IPs of permabanned users
This makes it so permabanned users can't permanently take out a shared
IP.
2019-06-30 21:19:10 -04:00
Guangcong Luo
f569c020ee Fix #hostfilter entering punishments table 2019-06-30 21:18:52 -04:00
Guangcong Luo
7722d48bea Report host type in /ip 2019-06-30 21:18:30 -04:00
Bär Halberkamp
ed5d534224
Add an AFK timer and status messages (#5002) 2019-07-01 01:47:13 +02:00
asgdf
6e709206c3 Support /math in PMs (#5561) 2019-06-30 15:50:33 -07:00
Kirk Scheibelhut
0941b9b546 Fix lint error in server/ip-tools.ts 2019-06-29 07:28:58 -07:00
Guangcong Luo
3ccc94279a Update /offertie
- Disallow use in tournaments

- Add /requesttie alias
2019-06-27 19:16:12 -04:00
Guangcong Luo
82e8dc6ea1 Add proxy IP detector to IPTools
By default, PS doesn't have very many tools for dealing with ban
evaders on proxies - most of the main server's protection is in private
code.

This commit adds a basic IP evaluator to PS. It categorizes IPs into
residential, mobile, and proxy (and a few other determinations), and
locks proxy IPs by default. DNSBL entries remain semilocked.

This behavior can, as always, be customized via hostfilter. Detect
`user.locked === '#hostfilter'` for the proxy IP lock, which you can
just set `user.locked = null` to disable.

Fixes #5239
2019-06-27 10:25:19 -07:00
Jacob McLemore
36edfd8bde Datasearch: Add ability to search for moves not in a Pokemon's moveset (#5522) 2019-06-27 09:24:56 -07:00
HoeenHero
1df2fc5ead Remove leftover code for previously removed ticket types 2019-06-25 19:09:33 -04:00
HoeenHero
efe6245239 Fix input logs (#5539) 2019-06-26 07:38:17 +09:00
LegoFigure11
cb60a80327 /calc: Update credits and add Battle Spot calculator (#5554) 2019-06-26 03:11:18 +09:00
whales
ba473ac1ea Allow for namelocking without their exact current name (#5552) 2019-06-23 14:54:27 -07:00
anAwsomePerson
9b6950f282 Change dexsearchhelp (#5555) 2019-06-23 14:52:14 -07:00
whales
233e9d07dc Fix whitelisting FRd names (#5553) 2019-06-22 22:58:49 +09:00
Guangcong Luo
4d231a7f96 Comment replay permission check 2019-06-22 21:54:39 +09:00
Marty-D
2daad0c775 Actually fix full replay uploading 2019-06-21 14:42:09 -04:00
Kirk Scheibelhut
0900f11727 Allow roomauth to /hidetext even when there's no user object (#5546) 2019-06-21 17:24:30 +09:00
Kirk Scheibelhut
85b6325d4a Allow for viewing only punishment-related actions in the modlog (#5535) 2019-06-21 17:11:01 +09:00
maxalexandderpi
39799dc50d Update link in !suggestions (#5550) 2019-06-20 18:35:44 -07:00
TheJetOU
4d6bb5638e Prevent duplicate options in polls (#5532) 2019-06-18 23:32:36 +02:00
TheJetOU
c878afa2ad Slightly improve groupchats (#5544)
* Slightly improve groupchats
https://www.smogon.com/forums/posts/8138951
https://www.smogon.com/forums/posts/8155622

* Fix typo

Co-Authored-By: Kirk Scheibelhut <scheibo@users.noreply.github.com>
2019-06-18 21:21:54 +02:00
Kirk Scheibelhut
79f34441f2 Include a >version-origin hash if different from >version (#5542) 2019-06-16 13:24:11 +09:00
whales
04dcdaadb9 Fix checking punishments for subrooms (#5541) 2019-06-16 06:14:27 +02:00
whales
ccf1531f64 Fix crash in uno (#5540) 2019-06-15 13:41:56 +09:00
Kirk Scheibelhut
89b7f8fd3f Fix crash in /crq (#5536) 2019-06-12 22:37:16 +09:00
asgdf
b7812e64d2 Support filtering by zmove in movesearch (#5531) 2019-06-12 09:36:23 +09:00
Bär Halberkamp
dfccccd977 Actually, this isn't needed with the fix in punishments.js.
Whoops, overkill
2019-06-11 22:00:28 +02:00
Bär Halberkamp
50f2588c84 Punishments: fix several bugs in interaction between namelocks and locks, specifically extending 2019-06-11 21:54:25 +02:00
Kirk Scheibelhut
77edd18e59 Improve /calc's random battle auto detection to include unrated battles 2019-06-10 11:20:44 -07:00
whales
8ed9dfa4d5 Fix namemonitor message (#5530) 2019-06-09 21:16:52 -07:00
Bär Halberkamp
05d80815f0
TOTD: Increase nomination length limit by 25 2019-06-09 00:05:55 +02:00
Guangcong Luo
5508b46629 Make /crq userdetails|roominfo always respond
userdetails and roominfo are now guaranteed to send a response, with an
`id` field guaranteed to be equal to the target of the original client
query.

Fixes #5525
2019-06-05 16:05:29 -05:00
whales
33b505383c Clarify NameMonitor message (#5524) 2019-06-05 02:13:25 -05:00
RandbatsCalc
2aeec71a7a Info.js: Randbats calculator typo fix (#5521)
Fix misspelled "Calculator"
2019-06-04 01:22:17 -04:00
whales
5433e2104a Fix a potential user game state desync (#5517) 2019-06-02 17:06:01 -05:00
whales
a87143f613 Fix crash in multi elim tours (#5516)
With the old api, node.getChildAt would return null if the node had no children
2019-06-02 00:17:57 -05:00
whales
8214d994a8 Ensure all desyced games are cleared (#5514) 2019-06-01 09:47:50 -05:00
Guangcong Luo
540f01991c
Remove stray console.trace 2019-05-29 09:46:39 -05:00
whales
959d4c1ad4 Clear forcerename monitor names on namelock more completely (#5510) 2019-05-29 09:41:54 -05:00
Kirk Scheibelhut
1711ab4bab Notify users the first time a PM/challenge is blocked (#5469) 2019-05-29 09:31:57 -05:00
Guangcong Luo
3c6c4b0985 Fix Config.forcetimer 2019-05-25 14:36:02 +02:00
SuddenlyQ
24d0aa0441 Fix quotation marks when a username is already in use (#5512) 2019-05-23 16:22:02 -07:00
jetou
da32e5c4c2 Support requesting ties (#5454) 2019-05-23 17:42:34 +01:00
whales
448a25212e Fix multi-elimination tours (#5509) 2019-05-22 00:53:57 +01:00
whales
4ae608304b Don't notify using a forcerenamed name for namelocked users (#5504) 2019-05-19 22:34:41 +01:00
jetou
8f1093509d Improve roomevents (#5458)
* Improve roomevents

* toId -> toID
2019-05-19 21:08:01 +02:00
Konrad Borowski
78b8e2c6c9 Scavengers: Make queue rows template more reasonable to read 2019-05-19 18:25:18 +02:00
Charlie Kobayashi
f1ae0d6827 Scavengers: Viewhunt/Queue improvements/fixes (#5498)
* Scavengers: Viewhunt/Queue improvements/fixes

- Add "unrated" hunts to queue system
- fix /forcestarthunt, an add an unrated option for this.
- allow /viewhunt to show the current question while leaving the unknown answer blank

* Update scavengers.js
2019-05-19 18:12:43 +02:00
Guangcong Luo
9126fbfae2 Support alternative custom avatar config
The new config should be better compatible with group custom avatars.
2019-05-18 09:56:46 -04:00
Guangcong Luo
3ee9e6f802
Check games more defensively in user.rename
In theory this should be always kept in sync, but in practice it's kind of hard to keep it in sync.
2019-05-18 14:28:39 +01:00
whales
7375f17fe6 Track forcerenamed names (#5500) 2019-05-18 09:54:17 +01:00
jetou
5bf5df4ac7 Chat-commands: Fix hotpatching loginserver (#5502) 2019-05-17 15:44:53 +04:00
HoeenHero
5202d7cc5b Tournaments: Only increase player count by 1 2019-05-16 11:12:42 -04:00
HoeenHero
2915094c55 Mafia: Properly sub players out 2019-05-15 21:30:44 -04:00
Quinton Lee
33663ac040
Tournaments: Fix disqualifying and signups list sorting 2019-05-15 19:30:44 -05:00
HoeenHero
dea7aec87b Mafia: Fix crash with kicking players pre-game 2019-05-15 20:12:57 -04:00
Guangcong Luo
7436c1f0f2 Remove import = and export =
`import =` and `export =` are really only intended for backwards
compatibility with CommonJS. While I really don't like the new module
system TC39 has designed for us, it's what we should be using, and
consistency is important.
2019-05-16 01:27:07 +04:00
Kirk Scheibelhut
032096b53b Fix indent in server/loginserver.ts 2019-05-15 09:51:28 -07:00
HoeenHero
3c1294bcca Properly handle users leaving tournaments 2019-05-15 11:13:31 -04:00
jetou
a9ac65362f LoginServer: Fix makeRequests (#5501) 2019-05-14 21:32:18 -07:00
Quinton Lee
571bd9f68d
LoginServer: Fix instantRequest 2019-05-14 22:39:39 -05:00
Kirk Scheibelhut
56768f45de Fix /eff regression for type names 2019-05-14 17:26:04 -07:00
jetou
9fd6daa6d8 Initialize players with the player rank (#5499) 2019-05-14 16:56:43 +10:00
Guangcong Luo
4e3d3662ce RoomBattle: Don't destroy players at end of game 2019-05-14 11:04:34 +10:00
Guangcong Luo
e1c364fb79 Refactor DNSBL -> IPTools
This is mostly a TypeScript refactor, but it does come with several
renames:

Dnsbl -> IPTools
Dnsbl.query -> IPTools.queryDnsbl
Dnsbl.reverse -> IPTools.getHost
2019-05-14 10:57:08 +10:00
Kirk Scheibelhut
3d24166cdf toId -> toID
Closes #5479
2019-05-12 17:53:01 -07:00
Guangcong Luo
ca4247c7e6 Fix full-replay uploading 2019-05-12 13:26:40 +09:30
Guangcong Luo
2093539e06
Update RoomGame API (#5492)
- The big change here is that player.userid can now be empty. You can
  now fit state into RoomGamePlayer subclasses even when there are no
  users associated with them.

- `game.players` has been introduced as the new canonical list of
  players, including userless players. The old `game.players` has been
  renamed `game.playerTable`, for clarity.

- `game.addPlayer` now returns the added player

All existing RoomGames have been updated for the new API, and
RoomBattle is now officially a RoomGame subclass.

Tournaments was also massively refactored to be properly updated for
the old API, since that never happened, and should now be a lot more
readable.
2019-05-12 12:56:32 +09:30
whales
601759bbe3 Stop hidetext message from getting hidden (#5497) 2019-05-11 12:08:09 +09:30
jetou
9a7ce703f2 TypeScript server/chat formatter.js (#5495) 2019-05-10 09:23:46 -07:00
jetou
3a03568be2 TypeScript ladders-remote and ladders-local (#5490) 2019-05-09 11:09:27 -07:00
jetou
600ee612d2 TypeScript server/loginserver.js (#5485) 2019-05-07 21:17:53 -07:00
Jacob McLemore
a1f18f0290 Chat-Plugins: Fix regression in weakness command (#5484) 2019-05-07 18:42:53 +09:30
whales
1a41502ff2 Stop hidetext hiding the log message (#5483)
Relevant when hidetexting yourself
2019-05-07 16:42:57 +09:30
Kirk Scheibelhut
a9b26fce72 Typescript server/verifier.js (#5482) 2019-05-07 14:09:01 +09:30
Marty-D
8980989580 DNSBL: Add some hostnames 2019-05-06 12:26:01 -04:00
Konrad Borowski
6f41e28982 Trivia: Remove Weakest Link commands from help
This game mode is played very rarely.
2019-05-05 19:27:28 +02:00
Kirk Scheibelhut
10c744f733 Introduce an ID type to sim (#5468) 2019-05-04 13:13:12 +12:00
JetOU
1669fde631 Fix bug in /msg (#5466) 2019-04-29 16:04:35 +12:00
Marty-D
82f0f9c71b
DNSBL: Add some hostnames 2019-04-25 12:26:13 -04:00
Bär Halberkamp
c2cd72521a Rename variable in /warn 2019-04-24 12:25:50 -04:00
Bär Halberkamp
6f0d639755 Fix a logic mistake in my previous commit 2019-04-23 20:33:15 -04:00
whales
579dc632a3 Helptickets: Only prompt for info if ticket is inactive (#5461) 2019-04-23 17:16:40 -04:00
Bär Halberkamp
d0346b9090 Helptickets: don't send automated message when staff use blocked msgs 2019-04-23 17:14:01 -04:00
Bär Halberkamp
cf05bc158e Allow global warns on users that have disconnected
This is so staff can still log the ip and name for users who just logged off
2019-04-23 17:09:01 -04:00
Guangcong Luo
d96bec3e43 Refactor Punishments.search
It used to have a really weird return signature. I've replaced it with
an array of search results, which should be easier to use and make more
sense.
2019-04-23 05:31:50 +09:30
Kirk Scheibelhut
7e4929a39f Change protocol for '|split' message type (#5331) (#5332) 2019-04-22 09:20:47 +09:30
Guangcong Luo
17ebb805a4 Fix typechecking in punishments.js
It turns out the line `let Punishments = module.exports;` makes it into
`any`, and disables nearly all typechecking of anything to do with
`Punishments`. This refactor fixes that, and also fixes a bunch of flaws
newly caught by TypeScript.

I tried my best not to make any changes to actual functionality. These
changes should be effectively purely code cleanup.
2019-04-22 08:39:05 +09:30
Guangcong Luo
e33afd90a2 Rebuild on /updateserver rather than /hotpatch
Rebuilding on /updateserver is nicer than needing to do it individually
per hotpatch function, and also makes it apply to restarts (in case
you're manually launching `node server` instead of
`./pokemon-showdown`).
2019-04-21 20:51:38 +09:30
whales
b8799b4ae6 Allow staff to hidetext themselves (#5452) 2019-04-20 21:48:16 +09:30
Kirk Scheibelhut
6fea91ee56 Split dev-tools/globals* into sim and server (#5450) 2019-04-18 04:17:54 +09:30
JetOU
19d561d76f Calculator: Support modulos (#5455) 2019-04-17 22:22:30 +09:30
Jacob McLemore
454c599b84 Movesearch: Add ability to search for moves in more than one Pokemon's learnset (#5346) 2019-04-17 16:44:42 +09:30
Konrad Borowski
f123adf560 Uno: Include card name in aria-label
Buttons with content like "S" aren't accessible as it's not obvious
that "S" means Skip, and they don't mention which color the card is,
which before this change was visible only by checking the style
attribute.

Having an aria-label attribute gives an accessible alternative for
screen readers. A screen reader probably won't tell an user a button
is red, and this is somewhat important while playing Uno.
2019-04-16 22:20:13 +02:00
Kirk Scheibelhut
7177f4ddcf Include diffs of all User settings in |updateuser| (#5438) 2019-04-16 06:20:36 +09:30
whales
71c372f7d0 Scavs: Fix reset message (#5447) 2019-04-16 05:18:21 +09:30
HoeenHero
820eff0410 Escape HTML in help ticket hover messages 2019-04-14 07:38:46 -04:00
HoeenHero
d6b4705870 Help Tickets: General Improvements 2019-04-13 15:50:23 -04:00
Distrib
2713112c7b Helptickets: Fix Request a password reset (#5446)
I just noticed that the link is not up to date. On the room help is another link, so I replaced it.
2019-04-13 13:29:20 +02:00
Kirk Scheibelhut
ceb490adb5 Remove '@' from usernames (#5440) 2019-04-12 14:04:38 -04:00
whales
e29df1d09f Update scavengers (#5434)
Tie databases to the room so they survive hotpatches, change finish message order
2019-04-11 23:07:11 +09:30
Guangcong Luo
fe9cb57fa5
Support multiline commands in PM (#5426)
This is a huge hack... :[
2019-04-11 14:17:24 +08:00
Bär Halberkamp
a78b6117a5 Punishments: fix undesired behavior when unlocking users
There were a couple of edgecases that caused punishments to be duplicated due to remnants of the old, overly
ambitious, spreading of punishments
Also check all users for potential unlocks, even when the user being unlocked is offline
2019-04-09 12:35:36 -04:00
Kirk Scheibelhut
f9164d4d59 Pull out non-sim code into RoomBattleStream (#5428) 2019-04-09 17:58:07 +08:00
Kirk Scheibelhut
e1356c055b Send blockpms and blockchallenges status in |updateuser| (#5422) 2019-04-08 01:43:12 +08:00
asgdf
57cbbf8161 Fix message order for locks (#5421) 2019-04-07 16:19:13 +08:00
Guangcong Luo
1eee50788f Refactor createBattle 2019-04-06 21:40:56 +08:00
whales
770d3e6b50 Typescript tours (#5323) 2019-04-06 15:51:32 +08:00
HoeenHero
bc069e4f27 Fix Input Logs 2019-04-05 18:26:52 -04:00
Austin Couturier
706b46cafd Allow Global Voices and higher to pm /code (#5411) 2019-04-06 01:02:49 +08:00
Guangcong Luo
5f8b1b81f1 Improve Help ticket messages 2019-04-05 10:55:03 -04:00
Guangcong Luo
851d1a8fb9 Improve !code's appearance
(Also alias /calc to /math)
2019-04-05 10:54:34 -04:00
Guangcong Luo
12f49b20e1 Move /code and /pi to chat-plugins/info.js
The two are definitely not core commands.
2019-04-05 09:41:11 -04:00
JetOU
25dd6ffcbc Improve /sp (#5309)
* Improve SP

* Remove useless code

which fixes a build error, killing two birds with one stone

* Move sorting code to page

* Increase readability

* Further increase redability

* Remove useless alts filtering

* Add semicolon

* Standardize output in punishments.js

* Remove punishDesc

* Close div tag

* Don't show if they end in 0s

* Improve conditional
This should (hopefully) fix a bug where a roomban showed up as 12 months, which is what happenes when `Chat.toDurationString` gets a negative number, `Chat.toDurationString` doesn't recognize anything below 1000ms anyway.

* Prevent rooms with '-' to use /sp

* Pluralize IP

* Fix mismatched tags

* Fix sort callback

* Remove useless conditional
2019-04-04 18:19:41 -04:00
Kirk Scheibelhut
6c1ab30977 Update dependencies (#5407) 2019-04-04 14:39:53 +08:00
Spandan Punwatkar
6856ee9b23 Add sort parameter to /dexsearch (#5291) 2019-04-03 14:42:47 +08:00
MacChaeger
28affbc0ce Prevent a tournament exploit (#5353) 2019-03-31 18:19:47 +08:00
JetOU
0976c5f3c3 Helpticket: Use for-of instead of for-in in arrays (#5385) 2019-03-30 20:56:41 -05:00
Kirk Scheibelhut
081ce82d15 Revert "Sockets: Refactor event handlers" instead of sockjs. (#5378)
* Revert "Sockets: Refactor event handlers"

This reverts commit d1242593f3.

* Revert "Switch back to sockjs 0.3.18 (#5376)"

This reverts commit 880ded4ed8.
2019-03-30 00:52:02 +08:00
Lucas-Meijer
c8fe3374e9 Mafia: Shorten Idea Timer and Correct IDEA Rolelists (#5357) 2019-03-28 08:54:09 -04:00
HoeenHero
d40c4f9db7 Update language support for /analysis 2019-03-27 13:15:28 -04:00
HoeenHero
8d9af2bb83 Battlesearch: Fix date sorting 2019-03-27 13:15:24 -04:00
JetOU
b396ce9edb Allow multi-line htmlbox (#5334) 2019-03-27 22:06:51 +08:00
Konrad Borowski
073a68bb3b Always mention subroom status in /roomauth (#5349)
In particular this allows displaying this information when room has no
roomauth.
2019-03-25 21:32:28 +01:00
Guangcong Luo
c25b152e51 Fix onCreateBattleRoom
(And some other issues introduced by 4p refactor.)
2019-03-26 00:47:48 +09:00
Ivo Julca
d4b9b98678 TCG: Refactor net functions
- Fix error handling
- Use async-await
2019-03-24 02:24:30 -05:00
whales
b7eca3794d Send roomid in /cmd roominfo response (#5339) 2019-03-23 16:08:43 +09:00
whales
5cbee5d996 Prevent getting info of the global room (#5328) 2019-03-20 17:43:16 +09:00
Guangcong Luo
2153f768e1
Fix createBattle logic 2019-03-18 19:49:16 +09:00
Ivo Julca
d1242593f3 Sockets: Refactor event handlers
Define them early for better performance
2019-03-18 00:53:09 -05:00
MacChaeger
6ac8266696 Support 4 player battles (#5266) 2019-03-18 13:37:27 +09:00
Snaquaza
00fab15ca4 Mafia: Add Themes (#5305) 2019-03-17 06:54:29 -04:00
Ben Davies
3204b721b4 Fix bug in /cmd roominfo
It was checking whether or not a user was capable of viewing a private
room's info based off the room it was sent in, not the target room.
2019-03-16 08:48:49 -03:00
Ben Davies
665c6e4499 Add autoconfirmed user metadata to /cmd userdetails (#5306) 2019-03-12 13:41:51 -07:00
Ivo Julca
3686dcfe46 TS: ModdedDex#generateTeam() returns PokemonSet[] 2019-03-12 00:29:59 -05:00
Ben Davies
29f9c97816 Commands: make /cmd roominfo call secret rooms secret, not private 2019-03-11 19:11:13 -03:00
Ben Davies
80cbca67e5 Make /modjoin false set room modjoin property to null, not undefined 2019-03-11 18:58:55 -03:00
Ben Davies
6809679733 Trivia: allow batch adding/submitting questions 2019-03-11 14:55:02 -03:00
Bär Halberkamp
f46aa55f43 Info: That's supposed to be global mod not roommod... 2019-03-11 17:50:25 +01:00
JetOU
09167da8dc Fix crash in server/punishments.js (#5300) 2019-03-11 17:09:18 +01:00
JetOU
1d70080d02 Fix crash in server/tournaments/index.js 2019-03-11 01:29:45 -05:00
Ben Davies
d8006887e4 Fix typo in server/tournaments/index.js 2019-03-10 23:04:42 -03:00
MacChaeger
489b48c308 Rename most of room-battle.js's exports (#5289) 2019-03-09 22:34:17 -06:00
JetOU
708f656873 Info: Add /showpunishments command (#5223)
* Info: Add /roomstatus command

https://www.smogon.com/forums/threads/3534365/page-81#post-7977912
I'm not a big fan of the approach used here, but I didn't have any better ideas that worked.

* Fix build errors

* Remove response function

* Change command name

* Rewrite

* Use HTML pages

* Reword entries

* Check username map instead of IP map

* Prevent duplicate punishments from appearing.

* Use this.title

* Remove debug code

* Add a check if punishments exists

* Show ip and alts

* Pluralize IP

* Slight refactor in punishDesc

* Add check for Punishments.roomIps existence

* Return an error message for rooms without '-'

More specifically, rooms that aren't public, hidden or private. They couldn't use them anyway. This just handles them correctly.

* Join ip

* Use room.chatRoomData instead of...

checking for '-' in roomids.

* Update help command

* Clarify error message

* Simplify permission check

* Remove muteQueue variable

* Fix punishDesc

Alts would overwrite reason if it existed and punishDesc would always contain undefined due to not being defined empty. This commit fixes both bugs.

* Allow roomstaff to use /sp

* Refactor store iteration to for...of

As per CONTRIBUTING.md
2019-03-09 22:44:30 +01:00
Ben Davies
1f63aa7675 Allow /cmd roominfo to say modjoin is set to true
Bots can't differentiate whether or not modjoin's setting is based off
of modchat's or not otherwise.
2019-03-09 03:23:58 -04:00
Ben Davies
6e5b225c74 Fix what /cmd roominfo says modjoin is set to, include modchat 2019-03-09 01:26:29 -04:00
Ben Davies
929471a18f Implement /cmd roominfo (#5279) 2019-03-08 21:15:53 -06:00
JetOU
85533ee3a0 Change forEach to for...of (#5269) 2019-03-08 11:24:58 -06:00
Ben Davies
f6db058bd2
Chat-plugins: ignore links when determining room FAQ length (#5262) 2019-03-07 13:42:28 -04:00
Bär Halberkamp
c28340714d
Chat monitor: Compare userids in namefilter 2019-03-06 20:54:44 +01:00
TheMezStrikes
387f400a7e Fix forcerename tracking wrong username (#5265) 2019-03-06 13:28:30 -06:00
Bär Halberkamp
cf8cff25b6 Spotlights: disable spotlights in temp rooms 2019-03-06 03:05:05 +01:00
TheMezStrikes
b20daa42cc Trim FAQ target (#5252) 2019-03-05 07:35:01 -06:00
Bär Halberkamp
ac470ec52c Add a FAQ option for RNG 2019-03-04 20:41:56 +01:00
Konrad Borowski
90dcec5644 Use FS when loading Scavengers' data (#5238)
This prevents issues with loading old state while hotpatching.
2019-03-03 16:59:33 -06:00
Guangcong Luo
ce5a954ae2 Use array spread instead of Array.from 2019-03-03 08:47:08 -06:00
Kirk Scheibelhut
6e122d5d74 Refactor lib/ to be native Typescript (#5217) 2019-03-02 11:12:24 -06:00
asgdf
8c25d8dad6 Fix /dt showing 'undefined' as Zygarde ability (#5153) 2019-03-02 10:07:54 -06:00
Kirk Scheibelhut
32704acee1 Pull large avatarTable out into a Set constant. (#5228) 2019-03-02 06:14:46 -06:00
The Immortal
075da69253 Update Other Metagames 2019-03-01 17:27:26 +04:00
Konrad Borowski
04fef9e8df Log long modlog queries 2019-03-01 02:35:39 -06:00
Konrad Borowski
0a9af088ce Make modlog asynchronous
This should prevent issues in which the /modlog takes forever
because it's waiting for previous /modlog command.
2019-03-01 02:35:39 -06:00
Konrad Borowski
42d7f97bc8 Make !rules broadcastable
This fixes a regression.
2019-02-27 21:16:21 +01:00
Guangcong Luo
f5a8723f1c Fix build/hotpatch process
Hotpatching and running `./pokemon-showdown` now automatically run
`./build`. There should now mostly not be any reason you'd want to
manually run `./build`, except if you're invoking tests directly.

In addition, a lot of redundant code has been removed.

I'm not 100% sure this works on Windows, but I'm sure I'll get reports
if anything breaks.
2019-02-27 01:47:44 -06:00
Bär Halberkamp
2e4d04d243 Translations: fix missing english strings 2019-02-27 02:11:11 +01:00
Kirk Scheibelhut
b09fd63377 Refactor sim/ to be native Typescript (#5210) 2019-02-26 11:03:30 -06:00
HoeenHero
e4c24b3f53 Fix crash with PMs 2019-02-25 11:56:16 -05:00
Kris Johnson
da6f42c5c1 Change Untiered to (DUU) for Doubles (#5178) 2019-02-25 07:35:41 +04:00
The Immortal
bc1ff9fac4 Revert "Change (PU) to Untiered (#5170)"
This reverts commit d40fe510b4.
2019-02-25 06:26:21 +04:00
Bär Halberkamp
eb67a12ad6 Translation support (#5167) 2019-02-23 19:36:42 -06:00
Kris Johnson
d49610fcd7 Datasearch: Fix event Pokemon showing in LC searches (#5177) 2019-02-22 18:30:56 -06:00
Kirk Scheibelhut
dc4bfbc4ae Fix some Typescript related TODOs (#5198) 2019-02-22 17:48:16 -06:00
whales
fc2eda1cf7 Mafia: Resolve chat pages properly (#5192) 2019-02-21 13:35:44 +01:00
Bär Halberkamp
b3df28035d Chat monitor: make inap pokemon names weeklock instead of namelock 2019-02-21 01:06:53 +01:00
Guangcong Luo
11f5c007dc Lower tab size in !code 2019-02-20 16:57:36 -06:00
Jacob McLemore
34f90a9b55 Tours: Fix a forfeit being reported as failed even though it succeeded (#5188) 2019-02-20 02:11:43 -06:00
uzelbot
922a4cef95 Remove * from most permissions shown in /help (#5168) 2019-02-20 00:59:50 -06:00
Guangcong Luo
64089636dd Simplify evo data representation 2019-02-19 23:46:55 -06:00
Guangcong Luo
46134ce5f6 Improve data representation of evo method 2019-02-19 23:42:06 -06:00
Jacob McLemore
bad622e1cd Add evolution method information (#5179) 2019-02-19 23:04:20 -06:00
Guangcong Luo
997274cfc5 Use editprivacy permission for /ionext
This matches the permission for /ioo
2019-02-18 21:57:45 -05:00
Guangcong Luo
653b303a52 Support custom hideReplay setting 2019-02-18 21:46:26 -05:00
Bär Halberkamp
c2beb8321a Allow warning users outside the room in all global warn contexts 2019-02-18 16:18:36 +01:00
HoeenHero
c6ed4cedb7 TCG: Update wiki domain 2019-02-18 08:39:53 -05:00
Guangcong Luo
135746cbdc Fix crash in ghost connection fix 2019-02-17 11:46:28 -06:00
whales
374a1cde5a Mafia: Fix html room updates (#5174) 2019-02-17 11:08:37 -05:00
HoeenHero
68dd4184d8 Add alias for /hidetext 2019-02-16 20:39:39 -05:00
Bär Halberkamp
9ab6bbbf2e Cafe: Fix path 2019-02-16 23:56:46 +01:00
Kris Johnson
d40fe510b4 Change (PU) to Untiered (#5170) 2019-02-16 03:07:51 +04:00
HoeenHero
6d7115dfd5 Support the random battles damage calculator 2019-02-12 14:33:24 -05:00
Bär Halberkamp
8a5eeac84f This command is not technically deprecated but close enough 2019-02-12 19:07:52 +01:00
Bär Halberkamp
c4301a7c1f Show deprecated status of commands in the command help 2019-02-12 19:06:35 +01:00
Bär Halberkamp
5fb8b5e954
Add a PageContext for HTML pages and expand html page functionality (#5160) 2019-02-12 19:00:14 +01:00
whales
7f2994b4f9 Mafia: Fix starting games through the UI (#5156) 2019-02-12 08:44:18 -05:00
Konrad Borowski
bf0ad10a28 Remove deprecated commands from /help 2019-02-12 11:05:14 +01:00
Bär Halberkamp
efa47fc911 Deprecate /redir 2019-02-12 01:24:38 +01:00
Guangcong Luo
b498bb222c Require object literal method shorthand 2019-02-11 18:14:09 -06:00
Guangcong Luo
a5816ddcbe Fix math for counting battle turns
Turns out, requestCount goes up by 2 every turn, not 1.

In hindsight, this makes sense because we're giving every player their
own request ID.
2019-02-10 19:04:41 -06:00
Bär Halberkamp
33d3691566 Fix an edgecase regarding locks getting removed on guests
This caused /unnamelock to leave ghost users in the userlist
2019-02-10 17:20:30 +01:00
Ben Davies
58fd10f6cb Tweak ghost connection timeout, log their connection status 2019-02-10 01:13:10 -04:00
Guangcong Luo
bd50666e4d Fix /hotpatch chat
Old chat plugin processes weren't getting correctly ended.
2019-02-09 21:52:57 -06:00
Guangcong Luo
b7c252fbd6 Automatically end BattleStreams at end of battle
PS prefers to keep battle streams open (for `/evalbattle`) until
manually ended, but this is confusing some other users. We now
automatically end streams unless the `keepAlive` option is set.

Fixes #5157
2019-02-09 21:16:45 -06:00
Guangcong Luo
330892ef72 Remove 7 second limit for multi-laddering 2019-02-09 20:34:28 -06:00
Guangcong Luo
7cac561c27 Fix hotpatching battles/formats
Hotpatching battles only is no longer possible - it takes the same
amount of resources as hotpatching formats but is way more error-prone.
2019-02-09 11:38:02 -06:00
Guangcong Luo
f8cc6c2881 Clarify message for multi-laddering 2019-02-09 11:38:02 -06:00
SuddenlyQ
0796613a72 Add in-battle mod detection to /weak and /coverage (#5144) 2019-02-09 12:25:45 -05:00
Guangcong Luo
248e7ed767 Fix Help Tickets preview 2019-02-09 00:09:49 -06:00
Guangcong Luo
75dd2f408e Fix minor typos 2019-02-09 00:03:51 -06:00
Guangcong Luo
55f98af70f Better support IPv6 in IP checker 2019-02-08 23:52:23 -06:00
Guangcong Luo
f2edf2bd17 Fix crash in /processes 2019-02-08 23:20:23 -06:00
Guangcong Luo
2816b33869 Allow free multi-laddering in first five turns
Searching for multiple games in the first five turns is unlikely to be
timerstalling, so we allow it here.
2019-02-08 16:06:08 -06:00
Kris Johnson
39ee0477c1 Movesearch: Account for custom recoil (#5151) 2019-02-07 16:50:47 -06:00
HoeenHero
222b4e7454 Fix ticket activation when the creator is staff 2019-02-07 15:43:01 -05:00
HoeenHero
6c3b8b5de5 Help Tickets: Require users to explain their issue before getting help (#5148) 2019-02-07 13:07:18 -06:00
Spandan Punwatkar
a041239224 Add Recoil as Move Search Parameter (#5149) 2019-02-07 12:10:11 -06:00
Konrad Borowski
f85d523630 Suppress LGTM's URL sanitization warning (#5147)
This warning is strictly speaking correct, the URL isn't verified
properly. However, in this case, this isn't a practical issue, as
it's possible to use /forcebattleban command anyways.
2019-02-07 12:06:47 -06:00
Konrad Borowski
0a7c37990a Refactor Emoji regex to use \p syntax (#5146)
(Increases minimum Node version requirement)
2019-02-07 11:59:16 -06:00
whales
7e8d588f7d Mafia: Support hiding discards, starting from open signups (#5142) 2019-02-06 19:15:09 -05:00
Guangcong Luo
8eba261f0b Fix crash in /data 2019-02-06 16:24:48 -06:00
Guangcong Luo
21ba77befa Fix hotpatch uncaching
Chat.uncache functions now consistently take a path relative to repo
root, just like FS.

Next step will probably be to have FS handle all text-based databases.
2019-02-06 15:59:28 -06:00
HoeenHero
870d308ee6 Fix modlog search location 2019-02-06 11:59:04 -05:00
Bär Halberkamp
89838d657f Fix chat plugin file I/O after server/ refactor 2019-02-06 17:54:30 +01:00
HoeenHero
7f68ab7352 Battlesearch improve UI 2019-02-06 11:16:04 -05:00
Marty-D
0cc5649187
Help tickets: Remove timerstalling 2019-02-06 11:07:13 -05:00
DubbleClick
0a864e84d8 Fix some LGTM alerts (#5139) 2019-02-05 20:34:32 -06:00
Guangcong Luo
70b3e9a525 Rename channel -> room, subchannel -> channel
"channel" is just a fancy way of saying "room, but in sockets".
Renaming them like this should make it clearer exactly what's going
on in sockets.
2019-02-05 16:55:37 -06:00
HoeenHero
e05e41fd9b Fix the rest of the hotpatches 2019-02-05 12:21:03 -05:00
HoeenHero
879a4462a2 Fix Hotpatch 2019-02-05 11:48:06 -05:00
Guangcong Luo
ffdcff3abc TypeScript globals
A few globals: Monitor, LoginServer, etc weren't being correctly
TypeScripted. This should change that.
2019-02-04 18:04:13 -06:00
HoeenHero
3c2666ec7c Revert url for chatrooms.json updates 2019-02-04 13:19:36 -05:00
HoeenHero
68131906ca Fix StaticServer and loading rooms 2019-02-04 11:17:44 -05:00
Guangcong Luo
b15c9a60f9 Fix formatText support for & > etc in URLs 2019-02-04 09:17:48 -06:00
Guangcong Luo
f3e45fbb72 Move server code to server/
Also move mods/ to data/mods/

This makes PS more monorepo-like. The intent is to further separate
the sim and the server code, but without fully committing to splitting
the repository itself.

We now support `./pokemon-showdown start` in addition to
`./pokemon-showdown`. I'm not clear which I want to be the default
yet.
2019-02-03 16:07:06 -06:00