diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-03-05 03:30:21 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-03-05 03:30:21 -0500 |
| commit | 44f85b846574bdf7f7e21a3e925889548221c17c (patch) | |
| tree | 2365bdafe5e0d47f8da1eb67c125edfd3c388f85 /server.js | |
| parent | 890bc8ded144a0555d3c947ef377295bcdbdc724 (diff) | |
+=
Diffstat (limited to 'server.js')
| -rw-r--r-- | server.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -154,10 +154,10 @@ Channel.prototype.pushImage = function(image){ } Channel.prototype.addVote = function(data, user){ - if (data.nick in this.images && not( user.nick in this.votes )) { + if (data.nick in this.images && !( user.nick in this.votes )) { this.voteCount++; this.votes[ user.nick ] = true; - this.scores[ data.nick ] += 1; + this.scores[ data.nick ] = this.scores[ data.nick ] ? this.scores[ data.nick ] + 1 : 1; if (this.voteCount == this.playerCount) this.startWinning(); } } |
