mirror of https://github.com/calzoneman/sync.git
Ceil voteskip requirement instead of truncating
This commit is contained in:
parent
229f8a206a
commit
4937dca98e
|
@ -965,7 +965,7 @@ Channel.prototype.broadcastChatFilters = function() {
|
|||
Channel.prototype.broadcastVoteskipUpdate = function() {
|
||||
var amt = this.voteskip ? this.voteskip.counts[0] : 0;
|
||||
var count = this.users.length - this.afkers.length;
|
||||
var need = this.voteskip ? parseInt(count * this.opts.voteskip_ratio) : 0;
|
||||
var need = this.voteskip ? Math.ceil(count * this.opts.voteskip_ratio) : 0;
|
||||
for(var i = 0; i < this.users.length; i++) {
|
||||
if(Rank.hasPermission(this.users[i], "seeVoteskip") ||
|
||||
this.leader == this.users[i]) {
|
||||
|
@ -1563,7 +1563,7 @@ Channel.prototype.checkVoteskipPass = function () {
|
|||
return false;
|
||||
|
||||
var count = this.users.length - this.afkers.length;
|
||||
var need = parseInt(count * this.opts.voteskip_ratio);
|
||||
var need = Math.ceil(count * this.opts.voteskip_ratio);
|
||||
if(this.server.cfg["debug"]) {
|
||||
console.log("afkers=", this.afkers.length);
|
||||
console.log("users =", this.users.length);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"author": "Calvin Montgomery",
|
||||
"name": "CyTube",
|
||||
"description": "Online media synchronizer and chat",
|
||||
"version": "2.2.2",
|
||||
"version": "2.2.3",
|
||||
"repository": {
|
||||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue