voteskip: add early exit for duplicate votes
This commit is contained in:
parent
f6a58d00b2
commit
2d6af31c00
3 changed files with 7 additions and 2 deletions
|
|
@ -40,7 +40,10 @@ VoteskipModule.prototype.handleVoteskip = function (user) {
|
|||
this.poll = new Poll("[server]", "voteskip", ["skip"], false);
|
||||
}
|
||||
|
||||
this.poll.vote(user.realip, 0);
|
||||
if (!this.poll.vote(user.realip, 0)) {
|
||||
// Vote was already recorded for this IP, no update needed
|
||||
return;
|
||||
}
|
||||
|
||||
var title = "";
|
||||
if (this.channel.modules.playlist.current) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue