Merge branch 'master' into dev

This commit is contained in:
Calvin Montgomery 2013-08-01 00:04:07 -04:00
commit b9ccf05416
4 changed files with 6 additions and 6 deletions

View File

@ -1550,8 +1550,8 @@ Channel.prototype.tryVoteskip = function(user) {
}
this.voteskip.vote(user.ip, 0);
this.broadcastVoteskipUpdate();
var need = parseInt(this.users.length * this.opts.voteskip_ratio);
need -= this.afkcount;
var count = this.users.length - this.afkcount;
var need = parseInt(count * this.opts.voteskip_ratio);
if(this.voteskip.counts[0] >= need) {
this.playNext();
}

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "2.2.0",
"version": "2.2.1",
"repository": {
"url": "http://github.com/calzoneman/sync"
},

View File

@ -6,7 +6,7 @@ var Logger = require("./logger");
var Channel = require("./channel");
var User = require("./user");
const VERSION = "2.2.0";
const VERSION = "2.2.1";
function getIP(req) {
var raw = req.connection.remoteAddress;

View File

@ -96,8 +96,8 @@ User.prototype.setAFK = function (afk) {
}
if(chan.voteskip) {
chan.voteskip.unvote(this.ip);
var need = parseInt(chan.users.length * chan.opts.voteskip_ratio);
need -= chan.afkcount;
var count = chan.users.length - chan.afkcount;
var need = parseInt(count * chan.opts.voteskip_ratio);
if(chan.voteskip.counts[0] >= need) {
chan.playNext();
}