Update voteskip.js

fixed an issue where the voteskip socket emit would send {0 count, 0 need} upon voteskip passing
This commit is contained in:
h2v4c 2017-01-25 12:54:04 -06:00 committed by GitHub
parent 97de993055
commit 022fda3d1c
1 changed files with 2 additions and 2 deletions

View File

@ -75,14 +75,14 @@ VoteskipModule.prototype.update = function () {
return;
}
this.sendVoteskipData(this.channel.users);
var max = this.calcVoteskipMax();
var need = Math.ceil(max * this.channel.modules.options.get("voteskip_ratio"));
if (this.poll.counts[0] >= need) {
this.channel.logger.log("[playlist] Voteskip passed.");
this.channel.modules.playlist._playNext();
}
this.sendVoteskipData(this.channel.users);
};
VoteskipModule.prototype.sendVoteskipData = function (users) {