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
Ivo Julca
4d50e275b1
Remove ´watchFile´ global
...
Also, calls to ´fs.watchFile´ are no longer embedded in try-catch blocks, as its call would only crash in some platforms (Windows) in versions of Node.js no longer supported (before Node v0.8.0).
2014-07-31 21:24:28 -05:00
小太
32ad9318c1
Rename tournaments/middleend.js -> tournaments/index.js
2014-07-19 19:51:55 +10:00
Guangcong Luo
03c94929fd
Move custom.css watching inside loginserver.js
2014-07-16 23:08:44 -04:00
小太
4bf80f4d43
Rename frontend.js to middleend.js
2014-07-09 01:58:50 +10:00
Quinella
0c4f929339
Block connection for every connection when flooding
2014-06-06 23:12:17 +02:00
Quinella
7f2c282582
Less spammy connection flooding bans
2014-06-06 23:06:28 +02:00
Slayer95
7602236814
Escape HTML in crash reports
...
This has been overlooked for a while.
Directly calling sugar.js strings' escapeHTML method to avoid further crashes if Tools.escapeHTML is missing for any reason.
2014-05-12 23:04:45 -05:00
Slayer95
b025743d34
Global 'sanitize' is now 'escapeHTML' method of Tools
2014-05-12 20:52:29 -05:00
Guangcong Luo
42963ba72a
Ban IPs for connection flooding
2014-05-04 14:20:10 -04:00
Guangcong Luo
5c7949c0b1
Revert "Merge pull request #824 from kotarou3/shadowban"
...
Its CPU usage is unacceptable for main.
This reverts commit cfc30d71b1 , reversing
changes made to 68b42fe6a7 .
2014-04-30 22:16:55 -04:00
小太
3befc06197
Merge remote-tracking branch 'upstream/master' into shadowban
...
Conflicts:
rooms.js
2014-04-28 20:54:46 +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
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
3fc36ef80f
'clampIntRange is now a method of 'Tools' and no longer global
2014-04-18 15:14:54 -05:00
Slayer95
4c18aa60f1
Remove global 'fs'
2014-04-17 14:37:32 -05:00
Slayer95
4d50796d25
Fix watchConfig
2014-04-17 00:47:35 -05:00
Slayer95
75559362b4
Rename global config to Config
2014-04-17 01:12:28 -04:00
小太
c6913b5ba1
Implement shadowban
2014-04-15 18:02:48 +10:00
小太
4f6a3e9c36
Merge remote-tracking branch 'upstream/master' into tournaments-frontend
...
Conflicts:
package.json
2014-03-10 12:15:35 +11: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
Tyler Stark
bff353cc58
Second Pass at cleaning up the code. These are pretty safe edits that include adding 0 to decimal values, fixing variables that are declared multiple times, and removing duplicate keys
2014-02-09 23:38:57 -06:00
Tyler Stark
afb3dc0c09
First pass at code quality: adding semicolons.
2014-02-09 20:35:42 -06:00
小太
f9101abbe7
Merge remote-tracking branch 'upstream/master' into tournaments-frontend
...
Conflicts:
package.json
2014-02-03 00:24:23 +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
Guangcong Luo
9b66292832
Revert "Multiprocess team validator"
...
This reverts commit ce7cc3bf66 .
2014-01-12 13:47:11 -08: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
7755803f39
Better comments for sockets.js
2014-01-02 22:14:54 -08:00
The Immortal
40bf78a86f
Revert previous change
2013-12-26 23:50:56 -08:00
Guangcong Luo
462f6b138d
Gen 6 formats are no longer beta after Pokebank
2013-12-26 23:09:47 -08:00
小太
d5d179611b
Merge branch 'tournaments' into tournaments-frontend
...
Conflicts:
rooms.js
2013-12-12 18:41:53 +11:00
Guangcong Luo
33c31a41de
Refactor an unnecessary closure
2013-11-13 19:51:42 -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
4892e03362
Loosen the ResourceMonitor connection thresholds
2013-09-24 20:00:32 -07:00
Guangcong Luo
6a2add8898
ipbans.txt now supports CIDR format
...
This introduces a new file cidr.js, which handles matching CIDR IP
blocks. It replaces our dependency on node-ip.
The old proxy IP system is also moved to cidr.js.
2013-09-21 14:15:11 -07:00
小太
250aeb3260
Merge branch 'tournaments' into tournaments-frontend
...
Conflicts:
app.js
2013-09-16 16:05:45 +10:00
Guangcong Luo
975d5cf76a
More detailed banned messages
2013-09-15 20:59:47 -07:00
Guangcong Luo
de7d5310e2
IPs listed on Spamhaus's SBL are now locked rather than banned.
2013-09-14 09:12:33 -07:00
Guangcong Luo
d92035acdf
Support Spamhaus DNSBL
...
Now, by default, any IP on the Spamhaus DNSBL list will be automatically
banned.
2013-09-13 10:13:35 -07:00
Guangcong Luo
dcc24cdabd
Show a message to banned users.
2013-09-13 10:13:35 -07:00
Guangcong Luo
ae62e9e737
Update ResourceMonitor to control bandwidth
2013-09-01 02:37:35 -07:00
Joimer
1b0c9da330
Improve CMD command block
2013-08-27 13:11:02 +02:00
Joimer
750720c88f
Move emergency socket message logging to a higher level
2013-08-27 13:05:32 +02:00
Joimer
dcd8009e2c
ResourceMonitor: Fix weird start-up race condition
2013-08-27 11:54:54 +02:00
Joimer
248f425479
Fix ResourceMonitor.countCmd
2013-08-27 11:49:58 +02:00
Joimer
2f3a5d6ab3
Add ResourceMonitor control to cmd command
2013-08-27 11:20:22 +02:00
Joimer
0347866a19
Make sure the IO is totally blocked for a rejected connection
2013-08-27 10:54:57 +02:00
Joimer
24b0721f5f
Proper error logging for emergency mode file logs
2013-08-27 10:23:41 +02:00