When trying to start a battle during a lockdown, the message is
now "The server is restarting" instead of "The server is shutting
down", to make it clearer that it'll come back up in a few minutes.
- Make sure that error parameters are all instances of `Error`.
- `parseJSON` now distinguishes `null` values from invalid syntax, by returning an object with relevant information.
- Request timeouts are now handled by node built-in `setTimeout` method, and use custom `TimeoutError` (exported from `LoginServer` for debugging).
Yes, this is the server-side autojoin commit.
Most of the room joining logic has been moved from the /join command
to User#tryJoinRoom. /autojoin now supports a list of rooms to
join, comma-separated.
If a user tries to autojoin a private room, instead of emitting
'namerequired', the server will save the list of unjoined rooms
until the user has logged in, which saves a roundtrip from server
to client to server.
/autojoin ignores the join list if the connection is already in
any rooms, for various reasons including that it's only supposed
to be used on startup.
The recommended way to promote and demote is to specify the group
to promote/demote to. PS's group system has never been particularly
linear anyway, so this fixes weirdness and deprecates
Users.getNextGroupSymbol
Config.quietconsole is a new (intentionally undocumented) config
setting to decrease the amount of non-error messages PS outputs
to the console.
It's useful because of some upcoming improvements to other PS
console output, and this will make those easier to sift through,
but it's undocumented because only a huge server (namely, Main)
will actually have enough activity to need it.
'Confirmed' is a new pseudo-usergroup, halfway between autoconfirmed
and voice. It grants immunity to locks and works similarly to
autoconfirm status, except it's only granted by being globalvoice+,
roomdriver+, or manually confirmed.
The .forceRenamed flag was used to make sure /frt couldn't
accidentally grant console access. /frt had a lot of security
issues and was removed a long time ago, which renders this
part of the code obsolete.
Username roombans could be bypassed by joining the room before
merging into the banned user.
This removes connections from a room if they're merging into a user
roombanned in that room. It's done rather crudely because midway
through a merge, the user and connection objects are in an
inconsistent state.
Reverse DNS can't always find a host for certain common IP
ranges (generally cell networks), so we're going to fill in
a fake host in that case, to make rangebans and the like
easier.