Guangcong Luo
4831e68a8c
Multi-process battles!
...
Battles now occur in a separate process.
Hopefully, this results in a substantial increase in network stability.
WARNING: Battle crashes are now practically unrecoverable.
2012-08-01 13:48:58 -07:00
Guangcong Luo
31e642c5a2
Rename simulator.js to battles.js
2012-07-31 19:48:09 -07:00
Guangcong Luo
a230425dcd
Fixes to verifier
2012-07-29 14:23:05 -07:00
Patrick Roberts
2325ed9c9a
connection grabs IP from behind proxy and fs stream doesn't throw exception now
2012-07-28 23:22:36 -05:00
Guangcong Luo
b801be60c0
Normalize set variables
2012-07-28 17:28:42 -07:00
Guangcong Luo
8b0ee28f21
Hopefully this will make request limiting work properly
2012-07-23 23:30:15 -07:00
Guangcong Luo
8c7449d441
Try to limit the number of open requests
2012-07-23 23:25:49 -07:00
Guangcong Luo
1dc63e446f
Even fewer console messages
2012-07-23 23:25:49 -07:00
Guangcong Luo
ba78f59052
Continue cutting down on what we print to console
2012-07-23 13:36:11 -07:00
Guangcong Luo
5df400c39e
Support Node 0.6 and 0.8
2012-07-20 23:53:57 -07:00
Guangcong Luo
b654c5f5b6
path.existsSync is now fs.existsSync in Node 0.8
2012-07-20 14:33:53 -07:00
Guangcong Luo
12dac23bb1
setuid support
2012-07-20 13:43:24 -07:00
Guangcong Luo
0db9ffc394
Severely cut down on the number of debug messages
2012-07-17 12:45:25 -07:00
Guangcong Luo
6a4f08f26b
New request code - maybe it'll be better on the server?
2012-07-16 17:09:32 -07:00
Bill Meltsner
22cd7cab27
Guard against the mysterious and seemingly impossible situation where someone successfully connects with a null socket.
2012-07-08 20:38:06 -05:00
Bill Meltsner
c31ee2a428
Add SockJS as the default networking library.
...
You can still use Socket.IO by setting config.protocol in config.js.
2012-07-06 22:56:28 -05:00
Guangcong Luo
b3054fefdf
Load all data using tools.js
...
- the original names BattleItems etc have been deprecated; please use:
- Tools.getItem() accessor method if possible
- Tools.data.Items for lower-level access (e.g. iteration)
- app.js was also rearranged a bit
2012-06-13 22:51:37 -07:00
Guangcong Luo
12e9b5458b
Make tools.js support mods (past gens)
...
- replace Tools.foo with Tools.mod('gen4').foo for gen 4 tools
- mods are stored in mods/modname/ in the same directory structure as data/
- mods modify base data
- further documentation coming soon in mods/modding.md
2012-06-13 08:27:32 -07:00
Bill Meltsner
651881e2f1
Temporarily disable JSONP in Socket.io until https://github.com/LearnBoost/socket.io/issues/609 is fixed.
2012-06-09 01:18:33 -05:00
Guangcong Luo
7009b3a4bb
Revert bmelts's hasty porting of Id etc to Sugar.js extensions
...
- The reverted utility functions, toId/toUserid/sanitize/clampIntRange, were designed to handle unsanitized data gracefully
2012-06-08 15:44:49 -07:00
Guangcong Luo
37c8fca226
Even fewer globals:- getRoom -> Rooms.get, newRoom -> Rooms.create
...
- getUser -> Users.get
- getTime has been entirely removed; new Date().getTime() isn't that long
2012-06-08 14:51:40 -07:00
Guangcong Luo
e4f5686dc2
Fewer globals:
...
- serverid and servertoken are now only available as config.serverid and config.servertoken
- lobby is now only available as rooms.lobby
2012-06-08 14:38:13 -07:00
Guangcong Luo
ce506d3b3e
Rooms cleanup:
...
- Renamed: Room -> BattleRoom, Lobby -> LobbyRoom
- rooms.js is now its own file; app.js is now no longer huge
2012-06-08 14:32:48 -07:00
Guangcong Luo
e73c587e7d
Move a bunch of files into data/
...
also take this opportunity to rename movedex.js -> moves.js
2012-06-08 14:25:45 -07:00
Bill Meltsner
caaef761cf
Restore individual case-checking for user IDs in the 'challenge' message.
2012-06-03 15:27:46 -05:00
Bill Meltsner
c63593fdd7
Stylistic cleanup.
2012-06-03 13:47:35 -05:00
Bill Meltsner
a38f78d53b
Take more caution with what we accept from the client.
2012-06-03 13:46:31 -05:00
Bill Meltsner
7499f3f81c
Limit the size of the server-side chatlog.
...
We're now only keeping the last 100ish messages (100 plus any that arrived between updates). There's really no good reason to keep the entire thing in memory. This should also hopefully mitigate some of the lag issues.
2012-06-02 15:49:33 -05:00
Guangcong Luo
048d06239e
Chat throttling implemented
...
Happens mostly in users.js. Now, chatting is proxied through users.js, which handles throttling.
I tried to write my code to avoid race conditions, but I'm not entirely sure if I succeeded.
2012-05-31 02:42:52 -07:00
Bill Meltsner
4f729aae7f
Refactor most utility functions (toId, clampIntRange, etc.) into Sugar extensions of the relevant objects.
2012-05-24 01:41:01 -05:00
Guangcong Luo
41b670ad37
Add a new dependency: sugar
...
also clean up our includes a bit
2012-05-16 21:56:29 -07:00
Guangcong Luo
e9474d9745
Add some basic help information when starting the server
2012-05-16 21:56:28 -07:00
Guangcong Luo
588a6d5b48
Create a default config.js if it doesn't exist
2012-05-16 20:26:49 -04:00
Bill Meltsner
91541f50d4
Remove tiers.js completely.
...
Rest in peace.
2012-05-15 17:32:54 -04:00
Guangcong Luo
fedc12d35f
Consolidate formats data in formats-data.js
2012-05-15 16:07:35 -04:00
Guangcong Luo
015fb9a6fa
Prevent crash from invalid rooms
2012-05-12 18:12:07 -04:00
Patrick Roberts
6d6c00e1c5
Added NameLock Command Implementation
2012-04-27 14:52:20 -05:00
小太
9f11d4a7c2
New permissions system.
...
/help is only partially done though.
2012-04-20 17:29:01 +10:00
小太
c592a5ae65
Fixed the fix
2012-04-16 14:29:07 +10:00
小太
f03d2f516f
Proper four spaces -> single tab
2012-04-16 14:22:08 +10:00
小太
33162d2501
Revert "Four spaces -> Single tab"
...
This reverts commit 8f8d387f56 .
2012-04-16 14:09:07 +10:00
小太
8f8d387f56
Four spaces -> Single tab
2012-04-16 12:55:40 +10:00
小太
dfca43114d
Move braces to the same line as their control statements
2012-04-16 12:54:03 +10:00
小太
64d876f1ca
Begone, trailing whitespace!
...
Also converted all line endings to UNIX format
2012-04-16 12:03:15 +10:00
Guangcong Luo
2a12da42af
Even more validation
2012-04-14 12:59:32 -04:00
Guangcong Luo
82035632d7
More client packet validation
2012-04-13 21:52:10 -04:00
Guangcong Luo
12e559c330
Whoops - suppress commands from battles, too
2012-04-13 19:32:25 -04:00
Guangcong Luo
0018800c0c
My apologies to server runners, but chat-commands has been changed.
...
Namely, the meaning of return true and return false have been changed, to better match other event handlers
You can now return a string from parseCommand to have the user say that message. Used mainly to automatically escape messages, but could also be used for a profanity filter or something.
I also commented it a bit more.
2012-04-13 03:57:51 -04:00
Guangcong Luo
607b384099
Don't really need a debug message for ladder update
2012-04-12 00:09:37 -04:00
Guangcong Luo
4d7a209fc3
Better error messages
2012-04-09 22:23:03 -04:00