Commit graph

20 commits

Author SHA1 Message Date
Calvin Montgomery 331a4626a0 Fix borrow-rank 2017-08-06 20:42:33 -07:00
Calvin Montgomery 0118a6fb15 Refactor socket.io controller 2017-08-01 19:29:11 -07:00
Calvin Montgomery 5a78056c91 Some small refactoring 2017-07-24 22:08:26 -07:00
Calvin Montgomery 07179d6c83 Upgrade to jsli 2.0 2017-07-08 20:11:54 -07:00
Calvin Montgomery 53cee986c6 Resend userlist if rank changes meta visibility
Fixes #681.  Technically, resending the entire userlist is not
necessary; it would be sufficient to resent setUserMeta, but there's not
currently a bulk frame for that so sending the userlist is probably more
efficient.
2017-06-17 09:47:22 -07:00
Xaekai df0fc769d9 Single source of truth for AFK
Resolves #678
2017-06-15 21:48:17 -07:00
Calvin Montgomery 8306d2d1b6 Refactor logging 2017-04-04 23:02:31 -07:00
Calvin Montgomery f42e3bf2b7 Fix #656 2017-04-03 20:31:21 -07:00
Calvin Montgomery 99760b6989 Purge the awful refreshAccount logic
User.prototype.refreshAccount was responsible for multiple race
condition bugs as well as inefficient duplication of DB queries in an
attempt to correct such race conditions.

It has now been replaced by a more reasonable model:

  * Global user account information and aliases are fetched in parallel
    on socket connection
  * Channel rank is fetched when the user tries to join a channel
2016-10-03 23:12:22 -07:00
Calvin Montgomery 8b94c54d25 Fix bug causing channels to get stuck when DB is down 2016-08-31 21:32:42 -07:00
calzoneman 33f775051d Fixes for bot logins 2016-08-10 22:20:53 -07:00
calzoneman 0327b3de2e Modifications for ip session cookie 2016-08-10 22:10:02 -07:00
calzoneman 701d470494 Add initial blocking of new users in chat 2016-08-10 21:59:18 -07:00
calzoneman 312892e56b Short term additional fix for #583
The previous commits do not handle all of the edge cases of #583
appropriately.  This is a short term solution that will work, but is not
as efficient as it could be.  The whole refreshAccount function needs to
be reconsidered and replaced with a more sane way of handling atomic
updates to the user's account state.
2016-06-29 22:00:25 -07:00
calzoneman c70dc83504 Fix previous fix 2016-06-26 21:15:33 -07:00
calzoneman a360cd8808 Reject joins for channels mapped to other partitions 2016-06-07 22:47:49 -07:00
calzoneman 0ee7f05213 Make polls more efficient
Instead of emitting frames to each individual socket, group them into
socket.io rooms of people who can see hidden poll results and people who
can't, then just do 2 broadcasts.
2016-04-02 11:57:26 -07:00
calzoneman 20538e328f Replace legacy emitter with EventEmitter prototype 2016-04-02 11:23:34 -07:00
calzoneman b3c85e8534 Limit requestPlaylist to once per 60 seconds
If clients call it quickly in succession with large playlists, it can
cause node to get stuck stringifying socket.io frames and cause an out
of memory crash.
2016-02-06 19:40:50 -08:00
calzoneman 0109a87e55 package: build with babel for ES2015 support
* Rename lib/ -> src/
* Add `postinstall` npm target for compiling src files to lib
* Add `build-watch` npm target for development with babel --watch
* Add `lib/` to .gitignore
* Add `source-map-support` module for babel-generated sourcemaps
2015-09-23 19:27:04 -07:00
Renamed from lib/user.js (Browse further)