Commit Graph

281 Commits

Author SHA1 Message Date
Guangcong Luo
84e7d0b8f0 Support autolock/autoban from login server 2014-07-19 01:42:10 -04:00
Guangcong Luo
c77c25a471 Use null-prototype dict for connections 2014-07-19 01:41:49 -04:00
Guangcong Luo
ce9e9ce93d Fix comment in users.js 2014-07-16 23:40:37 -04:00
Guangcong Luo
716cd0578f Remove bannedwords feature
Username word bans are now implemented in the lobby server
2014-07-16 23:39:51 -04:00
Guangcong Luo
308ddebc67 Support Users() for Users.get() 2014-07-16 23:08:11 -04:00
小太
82132286ad Fix crash when room doesn't exist in getIdentity() 2014-07-08 15:18:35 +10:00
Guangcong Luo
0923c37ae6 Fix various crashes involving {} 2014-06-27 23:02:51 -04:00
Morfent
1e1e922770 Fix unlock on merge 2014-06-01 14:40:58 +00:00
Guangcong Luo
e1fb380f84 Optimize f7ea60fe25 2014-05-23 13:04:28 -04:00
Guangcong Luo
f7ea60fe25 Ban non-alnum characters at start of names 2014-05-20 01:58:10 -04:00
Guangcong Luo
08667d62cf Names can't start with { 2014-05-18 03:43:17 -04:00
Guangcong Luo
42963ba72a Ban IPs for connection flooding 2014-05-04 14:20:10 -04:00
Guangcong Luo
072d70c0a0 Make sure disconnectAll clears room lists
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).
2014-04-24 03:00:45 -04:00
小太
3869770cf7 Few minor style fixes 2014-04-22 20:05:14 +10:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
小太
6fb3bc332a Spaces around operators and === instead of == 2014-04-22 01:56:11 +10:00
小太
071863d9f8 Use proper quotes for all the command related files and other minor cleanup
Proper quotes are " for strings that will eventually be read by a human and ' for everything else
2014-04-21 18:55:08 +10:00
Slayer95
2efe53ab05 Add missing semicolons and remove whitespace 2014-04-19 00:05:31 -05:00
Slayer95
05e7060474 Deprecate 'toUserid' global
Replaced by 'toId'.
2014-04-18 16:49:16 -05:00
Slayer95
4c18aa60f1 Remove global 'fs' 2014-04-17 14:37:32 -05:00
Slayer95
75559362b4 Rename global config to Config 2014-04-17 01:12:28 -04:00
Guangcong Luo
c42a2f2aa7 Use fewer trys
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.
2014-04-10 19:04:24 -04:00
Guangcong Luo
99e885713e Better messages for login server errors 2014-03-31 00:32:53 -04:00
Guangcong Luo
f5d10cd85e Fix crash in unlock 2014-03-27 19:17:35 -04:00
Guangcong Luo
d4467c4636 Don't accept messages with too many lines 2014-03-23 05:08:26 -04:00
Guangcong Luo
c107cc68bd Make throttle limit a const instead of hardcoded
Also make the limit 6 messages instead of 8
2014-03-22 14:29:16 -04:00
Guangcong Luo
bb5865446b Bans and locks work by username too
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.
2014-03-18 08:13:17 -04:00
asgdf
5bb35f5bd7 increase throttle delay to 600 2014-03-18 08:13:09 -04:00
Guangcong Luo
e2b57563a6 Optimized team sending
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.
2014-03-05 23:30:16 -05:00
Guangcong Luo
d5b528dbcc Optimize bandwidth usage of updateChallenges 2014-03-05 23:27:10 -05:00
Guangcong Luo
a797c60173 Don't inherit locks from unregistered users 2014-02-15 17:20:47 -05:00
Tyler Stark
afb3dc0c09 First pass at code quality: adding semicolons. 2014-02-09 20:35:42 -06:00
Guangcong Luo
974eff0d44 Don't ladder search if we can't retrieve MMR 2014-02-02 20:21:54 -05:00
Guangcong Luo
1b0b3ec63b Optimize team validator
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.
2014-01-23 21:35:26 -08:00
Guangcong Luo
f1f88aeefa user.autoconfirmed tracks autoconfirmed userid 2014-01-23 09:30:38 -08:00
Guangcong Luo
b6a117bfc6 Optimize /whois
Warning: Some hardcoding used
2014-01-18 10:54:26 -08:00
Guangcong Luo
b19119cf9c MMR is now Elo 2014-01-14 22:59:22 -08:00
小太
839fdb005b Multiprocess Team Validator 2014-01-13 15:35:10 +11:00
Guangcong Luo
2cf7f32970 Revert "Make team checking asynchronous"
This reverts commit a8d63fd791.

Conflicts:

	config/commands.js
2014-01-12 13:49:03 -08:00
小太
a8d63fd791 Make team checking asynchronous 2014-01-12 16:55:19 +11:00
Guangcong Luo
a39fdd6006 Split off team validation to team-validator.js
This is the first step in a refactor to split team validation into
its own process.
2014-01-09 17:35:19 -08:00
Guangcong Luo
1afd06e1fa Narrow down verify mismatch errors 2013-12-26 23:04:45 -08:00
Joimer
cc31a6c31b Remove crash from emergency logging
The code hasn't been used for a while and changes on the file had made
it crash.
2013-12-17 12:38:27 +01:00
Guangcong Luo
80bf389570 API for spawning/killing socket worker processes 2013-11-19 01:31:03 -08:00
Guangcong Luo
61cf7d1e8e Fix miscellaneous bugs in load balancer 2013-11-13 21:13:03 -08:00
Guangcong Luo
dc70892f14 Use channels for broadcasting
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.
2013-11-13 19:55:26 -08:00
Guangcong Luo
466359023f Load balance connections to proxy processes
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.
2013-11-13 18:44:44 -08:00
Guangcong Luo
4ad19bb333 Refactor: Rename some permissions functions
In particular, Development Staff has been renamed to System Operator.
2013-09-22 16:42:52 -07:00
Guangcong Luo
3fdd6c3e97 Fix crash with autoconfirmed setting 2013-09-22 00:11:19 -07:00
Guangcong Luo
47723b2e11 Support new autoconfirmed user status
Autoconfirmed users are users whose accounts existed for more than one
week and who have played at least one rated battle.
2013-09-21 21:17:45 -07:00