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.
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
* 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
`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.
This is mostly a TypeScript refactor, but it does come with several
renames:
Dnsbl -> IPTools
Dnsbl.query -> IPTools.queryDnsbl
Dnsbl.reverse -> IPTools.getHost
- 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.
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.
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.
* 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
* 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
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.