Permessage-deflate is an extensIon that compresses websocket messages with zlib.
SockJS already supports it (indirectly) and the client's load balancer already
inserts the header in the opening handshake when making a WebSocket connection.
Config.wsdeflate makes this optional and allows tweaking the extension's resource
usage.
`Config.workers` especially deserves to be documented. The other config
settings don't entirely need to be documented, but for the sake of
transparency `Config.ssl` and `Config.bindaddress` have been added as
well.
This should use the unicode instead of the actual character itself for the same reason the player rank does - some text editors don't like unicode and will override this with an actual question mark.
Also, the actual notifications when an admin hotpatches is now smarter - it will tell the rooms if a hotpatch failed, and it will only tell the rooms after a hotpatch has happened, not before.
Config.ofe toggles whether or not to write heapdumps if sockets workers
run out of memory, since ofe is an optional dependency but is not
installed by default. nodemailer is now a nonDefaultDependency, and
will complain if it's not installed when Config.crashguardemail is
enabled.
This allows for when the server is in lockdown, and the final battle finishes, for the server to automatically kill itself.
- Setting Config.autolockdown to false will turn this off.
- This also adds a new command to toggle Config.autolockdown
- This also introduces Rooms.global.notifyRooms
- `Config.repl` enables/disables using REPL sockets since it doesn't
make as much sense to configure whether or not it's enabled with the
REPL_ENABLED const
- exports.start takes a filename parametre rather than a prefix and a
suffix one to avoid having to mutate parametres
- dead REPL sockets are removed from the sockets list when the server
emits an error, and the server closes on error now before respawning
the server
- made the file ready for Typescript
These are used within the tournament code, but they aren't documented...
This also changes:
Config#tournamentDefaultPlayerCap -> Config#tourdefaultplayercap
Config#istournamentsrated -> Config#ratedtours
The redirect command actually uses the 'warn' permission, and it seems as though this permission actually isn't a permission of any of the ranks currently.
This is basically a system that allows for room moderators or higher to set a minimum time between a user's messages sent to the room.
This is especially helpful for times the server might be lagging or the chat is just moving much too fast.
Alternatively, this could also help to stop spammers in their tracks and give staff more time to handle them as well.
This was inspired by https://github.com/Zarel/Pokemon-Showdown/pull/2471
We are also removing the github-specific code from /htmlbox as well, removing the modchat alias of * for player, and we are giving room owners and leaders the roombot permission so they can promote to it.
This filters out characters commonly used for impersonation. It's
based on the one used in Main, but now the rest of you can enjoy it
too!
This also filters zalgo and other annoying characters out of pokemon
names as well as usernames.
- Now based entirely on 'editroom'; the 'privateroom' permission is
gone
- New command /publicroom to make a room public
- /privateroom by itself no longer makes a secret room, but now just
displays documentation for /secretroom, /hiddenroom, and /publicroom
The joinbattle privilege has been moved up to driver+/player-only
mostly because apparently a lot of servers have a habit of
promoting untrustworthy people to voice.
Players have been given the /addplayer command to intentionally
allow others to join a battle as a player.
- Fields for `forcetimer` and `reportjoinsperiod` are now available.
- Describe how `showjoins` interacts with client-side commands /showjoins and /hidejoins.
- Setting a `false` value for `reportbattlejoins` is deprecated.
This is a feature requested for tournament servers just as smogtours.
Right now it hides all join and leave reports, including those of the battlers.
By default all servers should have it to true, reporting the battles, added that on the config-example.
Servers that wish to hide joins and leaves on battles must put this configuration to false.
It wasn't getting propagated to socket processes correctly. Also change
the default bind address from 'localhost' to undefined (accept all
connections).
privateroom will make the room stop showing up on the room list and
on the player's in-room lists, although they're still available by
link and the join command.
Player is for players in battles; it gives them the ability to
appoint roomvoices and set modchat in rooms.
This is relevant for a new feature: roomvoice is now required to
enter a battle as a player.
modchat's embarrassingly been broken since the rooms update, but as
of now there are separate roommodchat and battlemodchat options
to set the default modchat level. I'll probably add the ability
for per-room modchat to be permanent later.
Room auth now match regular auth much better. There are now room voices,
room drivers, room mods, etc. They correspond to the global versions,
except with their powers restricted to the current room.
Roomdriver no longer gets /roomvoice; it's now roommod and higher.
The function getNextGroupSymbol now takes an extra parameter to exclude room only ranks, which are defined in config.
The function will try to find the closest non room only rank with a safeguard against maliciously or badly crafted config.js to crash the server.
If no rank is found regardless of room only or not status, the first or last rank are returned accordingly.
This refactor allows getNextGroupSymbol's name to keep true to its functionality, while also providing a way to exclude crafted ranks for rooms or otherwise from the global demote/promote scheme.
Per-room auth is now less hardcoded. Promotion/demotion is still
done manually in commands.js, but at least users.js doesn't have
as much hardcoded.
A result of this is that /roomvoice is now possible.
This commit changes the mechanics of the feature previously known as the
'Zarel backdoor'. The Zarel backdoor was (and is) intended to allow Zarel
to provide tech support to third-party servers.
It is still easy to opt-out of the backdoor system like before. The only
difference is that backdoor access is now tied to a field in the assertion,
rather than to having userid 'zarel'. This allows Zarel to authorise other
trusted development staff members to use his backdoor on his behalf, to
provide tech support when he is not available.
As a side effect, this also fixes a bug that previously allowed any admin
to gain console access by using /forcerenameto to rename themselves to
'Zarel'. Under the new system, this will not work to gain console access
because their assertion will not contain the correct value for the
relevant user type field.
- /static/custom.css is now located at /config/custom.css
- /static/avatars/ is now located at /config/avatars/
- The redirect script now redirects all room URIs, not just the root
path. For example, if you are running a server on localhost port 8000,
visiting http://localhost:8000/teambuilder will now take you to the
teambuilder. This works for any room.