Commit Graph

49 Commits

Author SHA1 Message Date
Guangcong Luo
2ed88eb21f Server support for clicking on a user to get their avatar/rooms 2012-03-04 09:38:53 -05:00
Guangcong Luo
971cfa89ef Fix crash in getRoomList 2012-03-03 13:43:18 -05:00
Guangcong Luo
b0bb7597e8 getRoomList updated:
- now shows most recent 8 battles, not 6
- inactive rooms are now skipped correctly
- new syntax: getRoomList(true) to get all battles, not just most recent 8
2012-03-02 11:56:13 -05:00
Guangcong Luo
5cec184cae Report joins/leaves as deltas only:
- The entire user-list can now be shown, lag-less, no matter how many users are online
- config.lagmode is no longer needed
2012-03-02 08:14:51 -05:00
Guangcong Luo
30cbb1dd92 Report the 6 newest battles, not the 24 oldest 2012-03-02 08:12:13 -05:00
Guangcong Luo
12e6df3fed Improve getUser
- /ban, /mute, etc are no longer foiled by name changes
- The entire user list can be accessed from anywhere in PS as Users.users
2012-02-28 09:01:58 -05:00
Guangcong Luo
9eef7e79fb And now, the real implementation of /me 2012-02-27 09:59:38 -05:00
Guangcong Luo
986e5f6c44 Improved team validation:
- Arceus and Giratina formes now change depending on held item
- Meloetta and Darmanitan formes always reset to normal forme
- Outside of Hackmons, you're not allowed more than one copy of a move
2012-02-21 19:46:09 -05:00
Guangcong Luo
f8f4d8284e Add crash guard setting
(workaround for socket.io bug 609: https://github.com/LearnBoost/socket.io/issues/609 )
2012-02-18 07:31:40 -05:00
Guangcong Luo
5cc226b851 Double the message length restriction 2012-02-16 01:18:32 -05:00
Guangcong Luo
14259540a9 Revise the rematch support message a bit 2012-02-13 23:45:04 -05:00
Guangcong Luo
b366c990c5 More improvements to the 'kick inactive players' feature:
- If it is still the first 30 seconds, wait until the next 30 seconds before reminding players they have a time limit
2012-02-12 23:55:59 -05:00
Guangcong Luo
301e42034e Enable logging again 2012-02-12 23:54:01 -05:00
Guangcong Luo
fd60f42325 Fix the forfeit and kick inactive features
- they now work correctly when one player has left
- they now no longer work after a battle has ended
- they don't go through in the case of a curCallback bug
2012-02-12 15:29:40 -05:00
Guangcong Luo
b82e02a288 Forfeit feature! Closing a room now confirms an immediate forfeit, instead of forcing the other player to wait 60 seconds for a timeout. 2012-02-12 06:44:51 -05:00
Guangcong Luo
024b863a88 Overhaul the battle timeout system.
Instead of a flat 3 minute timeout, your timeout time will decrease (to a minimum of 1 minute per turn) if you try to stall.
2012-02-11 07:00:32 -05:00
Guangcong Luo
20b3322556 Nicer battle URLs: /lobby-battle1337 -> /battle-ou1337 2012-02-11 02:18:55 -05:00
Guangcong Luo
8b5f899688 Don't crash if lastbattle.txt doesn't exist. 2012-02-11 01:54:34 -05:00
Guangcong Luo
29508148a6 Lots of changes to chat commands:
- Moderated chat mode is now implemented in chat-commands.js, not in app.js
- Moderated chat mode can now restrict by group: /modchat @ = only @ and & can talk
- New commands: /announce, /modchat, /sysop, /desysop, /whois
- New informational commands: /groups, /opensource, /avatars, /intro
- The /help documentation has been updated to match these (and other earlier) changes
- chat-commands.js has been refactored a ton, it uses switch instead of if-else's
2012-02-11 01:34:51 -05:00
Guangcong Luo
b365e4cae2 Fix a whole bunch of crashes 2012-02-09 22:57:59 -05:00
Guangcong Luo
928df6f498 Split parseCommands out into its own file: chat-commands.js 2012-02-09 22:05:13 -05:00
Guangcong Luo
9e7aa92daa Require some sort of rank to use !data, and also make it fail silently. 2012-02-09 21:55:32 -05:00
Guangcong Luo
0d84f44737 Report unregistered users while in lag mode separately from guest users 2012-02-09 21:50:39 -05:00
Guangcong Luo
be917a24df Give an error message when trying to challenge a user that doesn't exist. 2012-02-09 21:11:04 -05:00
Guangcong Luo
804297d279 Change the "You can't battle yourself" message to a pop-up message. 2012-02-09 02:59:18 -05:00
Guangcong Luo
14fa744c65 Improve the custom avatar support in PS 2012-02-09 02:34:31 -05:00
Guangcong Luo
cd4c7f211f Some changes for custom avatar support 2012-02-09 00:49:09 -05:00
Guangcong Luo
f347db8566 Add /w and /whisper as ways to PM 2012-02-08 21:29:04 -05:00
Guangcong Luo
ee4e4b81b6 Reject messages longer than 255 characters 2012-02-08 21:28:44 -05:00
Guangcong Luo
137e948a18 Validate learnsets when challenging users, too 2012-02-08 21:20:21 -05:00
Guangcong Luo
75c56f3a10 Implement !data (like /data, but notifies entire chat) 2012-02-08 20:50:30 -05:00
Guangcong Luo
801d2e5031 Add four new configuration options to prevent lag on large servers:
- reportjoins - whether to display "<user> joined"
- reportbattles - whether to display "Battle started between <user> and <other user>"
- lagmode - whether or not the user list should display every user, or just voiced/registered users
- modchat - moderated chat: enable to disallow unregistered+unvoiced users from speaking

Also limit the lobby battle list to only the first 24 battles.

These were in fact enough for PS to handle an influx of 1000+ users from Reddit, lag-free!
2012-02-08 18:22:49 -05:00
Guangcong Luo
936da631ce Lockdown notifications are now sent as pop-up boxes
(they were previously sent as public log messages)
2012-02-08 18:21:45 -05:00
Guangcong Luo
0584552c3f Give an error message when people try to /register 2012-02-08 18:04:26 -05:00
Guangcong Luo
a4057da8d9 Empty rooms time out after ten minutes, not an hour 2012-02-08 18:03:13 -05:00
Guangcong Luo
edc72e5840 Get rid of a lot of logging, to free up RAM for the server. 2012-02-08 18:01:59 -05:00
Guangcong Luo
1f471aa6df Add the /data command for looking up pokemon/items/moves/abilities. 2012-02-05 23:28:20 -05:00
Guangcong Luo
7cb61d1fc8 If a player's left, the win timeout won't take longer than 60 seconds 2012-02-05 17:48:01 -05:00
Guangcong Luo
1ed497c7ca Add /ladder as an alias for /ranking 2012-02-05 05:05:58 -05:00
Guangcong Luo
b62aad3bf8 Add logging support (rated battles only)
You must create a `logs/` directory, and for each format you wish to log, a subdirectory named with that format's name in lowercase (spaces and punctuation stripped)
2012-02-05 03:07:05 -05:00
Guangcong Luo
8f4f6b7d8c Raise the minimum time between moves from 90 seconds to 180 seconds. 2012-02-05 01:32:50 -05:00
Guangcong Luo
07eddfc09f Allow specifying port via command-line. 2012-01-31 15:41:23 -05:00
Guangcong Luo
027f5a61aa Slightly better error messages when PMing fails 2012-01-30 00:33:05 -05:00
Guangcong Luo
ae49eb9219 Make sure empty rooms don't ever have more than one destroy timer. 2012-01-28 18:33:20 -05:00
Guangcong Luo
899cac42e0 Make rooms time out and deallocate after being empty for an hour
Should theoretically greatly increase the amount of time before PS runs out of memory
2012-01-27 19:19:33 -05:00
Guangcong Luo
84e6791dfc Update /ranking: added win/loss statistics, and updated rating stats to new ladder format (replace default Glicko2 rating with ACRE, and rename 'percentile' to 'GXE') 2012-01-02 02:22:59 -05:00
Guangcong Luo
d021d3eaf0 Fix typo that made the /ban command fail. 2011-12-31 03:19:52 -05:00
Guangcong Luo
45abd0bbc1 Add '-' before each reason for rejecting a team - should make it more readable. 2011-12-23 02:20:34 -05:00
Guangcong Luo
4ce2d95037 Everything I did before moving to Git 2011-12-22 23:53:05 -05:00