Commit Graph

2896 Commits

Author SHA1 Message Date
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