In some rare conditions it's apparently possible for a user to
disconnect without properly leaving a room. This makes sure that the
user leaves all rooms when disconnectAll is run (i.e. when the user
is banned).
I read something that says that V8 doesn't optimize any code inside
try-blocks. I hope this means that this change will lead to better-
performing code, but I suspect the difference will be relatively
small.
Now, when a user logs into a registered username that was previously
locked/banned, that user is also locked/banned.
The main reason this matters is because users who log in under an
autoconfirmed username are permanently autoconfirmed, even if they
log out and in to a new username. So when they're banned, they can
switch IP and regain autoconfirmed status. This change bans the
username that was autoconfirmed as well, so attempting to use it
to regain autoconfirmed status will result in an automatic re-ban.
Teams are now sent using our new packTeam/unpackTeam code, rather
than JSON. This compresses teams from an average of 2000 bytes to
an average of 500 bytes.
The main process no longer does any JSON parsing/stringifying of
teams. The communication protocol with validator processes has
been changed from JSON to a string protocol delimited by pipes.
A variety of more minor optimizations have also been done.
Now that we're using proxy processes, this heavily optimizes the
communication between the main process and the proxy processes
by sending broadcasted messages once, instead of once per user.
Instead of handling all connections in the master process, we now
use Node's cluster module to push them to worker processes. These
worker processes are pretty lightweight and do nothing but proxy
connections so far.