Commit Graph

293 Commits

Author SHA1 Message Date
Guangcong Luo
13987af589 Optimize alt finding 2014-08-30 02:20:20 -04:00
Guangcong Luo
f4add01ce0 Fix bug in previous optimization 2014-08-28 00:13:28 -04:00
Guangcong Luo
bd3bf8a603 Optimize getAlts 2014-08-28 00:05:27 -04:00
Guangcong Luo
9bd804838f Implement subchannels
This pushes most of the work of dealing with `|split` from the
main (room) process to the socket process.
2014-08-25 23:48:33 -04:00
Guangcong Luo
bf5d23f980 New bypassall permission
Apples to admins, makes it so admins aren't affected by bans.
I'll make it apply to mutes etc later.
2014-08-25 22:31:05 -04:00
Guangcong Luo
3919a7f66d Authed alts of unauthed users don't count as alts
Except for /whois, which will still display authed alts, any user of
rank + or higher will no longer be considered an alt of a non-authed
account for the purposes of locking, banning, etc.

Any authed accounts left around afterwards will need to be pretty
careful: opening a new PS window will lock your account because
your IP is still locked.
2014-08-22 00:25:39 -04:00
Guangcong Luo
9867656562 Unlock users that rejoin off-DNSBL 2014-08-18 17:35:44 -04:00
Guangcong Luo
08d4ef226e Track why a user was locked 2014-08-18 17:22:38 -04:00
Guangcong Luo
af2026436a More style fixes and Gulpfile updates
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.

The code has been fixed to match the new stricter standards.

JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
2014-08-10 20:43:53 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
Guangcong Luo
16e24b462e Improve wording for abuse list message 2014-08-09 02:26:06 -04:00
Guangcong Luo
925fecdb7a Detect hostname of users 2014-08-05 00:15:00 -04:00
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