From ce84b30354a5e33e1023d8aabcfed1f1886b2b94 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 23 Apr 2013 10:23:32 -0500 Subject: [PATCH] Tweak voteskip (Issue #49) --- channel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channel.js b/channel.js index 9552abb3..4f0b3abf 100644 --- a/channel.js +++ b/channel.js @@ -524,7 +524,7 @@ Channel.prototype.broadcastChatFilters = function() { Channel.prototype.broadcastVoteskipUpdate = function() { var amt = this.voteskip ? this.voteskip.counts[0] : 0; - var need = this.voteskip ? this.users.length * this.opts.voteskip_ratio + 1 : 0; + var need = this.voteskip ? parseInt(this.users.length * 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]) { @@ -945,7 +945,7 @@ Channel.prototype.tryVoteskip = function(user) { } this.voteskip.vote(user.ip, 0); this.broadcastVoteskipUpdate(); - if(this.voteskip.counts[0] > this.users.length * this.opts.voteskip_ratio) { + if(this.voteskip.counts[0] >= parseInt(this.users.length * this.opts.voteskip_ratio)) { this.playNext(); } }