Commit Graph

53 Commits

Author SHA1 Message Date
asgdf
320e92ab43 Linkify autoconfirmed alt display (#5779) 2019-09-15 01:20:36 -07:00
Guangcong Luo
fb6bb28bb1 Fix whitespace issue in #5772 2019-09-13 02:48:39 -07:00
fart
7af0d8ad77 Add IP lookup link to /alts (#5772) 2019-09-13 02:46:19 -07:00
HoeenHero
44dcede8ff Fix crash in alts 2019-09-01 14:10:58 -04:00
TheJetOU
e476279ba5 /showpunishments: Fix sorting (#5741)
(Thanks to @DaWoblefet for the report)
2019-08-30 13:02:15 -05:00
whales
71f4c020c1 Show trusted status is whois (#5740) 2019-08-30 09:46:57 -05:00
TheJetOU
2b28c9fd6b Refactor Rooms(), Users() to Rooms.get(), Users.get() (#5725) 2019-08-25 06:33:56 -07:00
whales
7eee6b3489 Fix URL for snatch and mirror dex lists (#5715) 2019-08-18 09:12:48 -04:00
supermii2
29655db703 Add descriptions for charge/recharge moves in /dt (#5712)
Charge moves and Recharge moves will have a tag when using /dt, similar to other tags like "Supressed by Gravity"
2019-08-17 10:37:02 +02:00
TheJetOU
f4e6fd7584 Implement a /showglobalpunishments command (#5703) 2019-08-15 20:25:30 +02:00
ayiadvance
76af6c5a12 Updated /intro (#5698) 2019-08-13 14:49:02 -07:00
RyotaMitaraiWeb
239d354adf Update a link in the /intro command (#5697) 2019-08-12 16:09:30 -04:00
Bär Halberkamp
3a278dd2a8 First batch of commands to make translatable 2019-08-09 02:53:11 +02:00
Slayer95
2989e653dd
Info: Fix target validation in /host 2019-08-03 23:26:05 -05:00
HoeenHero
a67be91f27 Make uptime avaliable to regular users
This command was originally restricted because users would complain
about lag when the uptime hit about a week. I'm removing this because
it makes it alot harder to verify a server's uptime meets the
requirements when registering servers, and its been a year or so
since lag complaints related to uptime were an issue.
2019-07-26 08:11:53 -04:00
fart
77e054d96c Fix /coverage bug (#5611) 2019-07-15 20:48:42 -05:00
Bär Halberkamp
ec3bfe8294 Fix /rules 2019-07-02 14:13:11 +02:00
Kirk Scheibelhut
a61c10eeb8
Remove hardcoded URLs in favor of Config.routes (#5557) 2019-07-01 10:19:21 -07:00
Guangcong Luo
7722d48bea Report host type in /ip 2019-06-30 21:18:30 -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
LegoFigure11
cb60a80327 /calc: Update credits and add Battle Spot calculator (#5554) 2019-06-26 03:11:18 +09:00
maxalexandderpi
39799dc50d Update link in !suggestions (#5550) 2019-06-20 18:35:44 -07:00
Kirk Scheibelhut
77edd18e59 Improve /calc's random battle auto detection to include unrated battles 2019-06-10 11:20:44 -07:00
RandbatsCalc
2aeec71a7a Info.js: Randbats calculator typo fix (#5521)
Fix misspelled "Calculator"
2019-06-04 01:22:17 -04:00
Kirk Scheibelhut
56768f45de Fix /eff regression for type names 2019-05-14 17:26:04 -07: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
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
Jacob McLemore
a1f18f0290 Chat-Plugins: Fix regression in weakness command (#5484) 2019-05-07 18:42:53 +09:30
Austin Couturier
706b46cafd Allow Global Voices and higher to pm /code (#5411) 2019-04-06 01:02:49 +08: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
HoeenHero
d40c4f9db7 Update language support for /analysis 2019-03-27 13:15:28 -04:00
JetOU
b396ce9edb Allow multi-line htmlbox (#5334) 2019-03-27 22:06:51 +08:00
Bär Halberkamp
f46aa55f43 Info: That's supposed to be global mod not roommod... 2019-03-11 17:50:25 +01: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
JetOU
85533ee3a0 Change forEach to for...of (#5269) 2019-03-08 11:24:58 -06: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
Kirk Scheibelhut
6e122d5d74 Refactor lib/ to be native Typescript (#5217) 2019-03-02 11:12:24 -06:00
Konrad Borowski
42d7f97bc8 Make !rules broadcastable
This fixes a regression.
2019-02-27 21:16:21 +01:00
Bär Halberkamp
eb67a12ad6 Translation support (#5167) 2019-02-23 19:36:42 -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
HoeenHero
6d7115dfd5 Support the random battles damage calculator 2019-02-12 14:33:24 -05:00
Guangcong Luo
b498bb222c Require object literal method shorthand 2019-02-11 18:14:09 -06:00
SuddenlyQ
0796613a72 Add in-battle mod detection to /weak and /coverage (#5144) 2019-02-09 12:25:45 -05:00