diff options
Diffstat (limited to 'server.js')
| -rw-r--r-- | server.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -154,7 +154,7 @@ Channel.prototype.pushImage = function(image){ } Channel.prototype.addVote = function(data, user){ - if (data.nick in this.images && not( user.nick in this.voters )) { + if (data.nick in this.images && not( user.nick in this.votes )) { this.voteCount++; this.votes[ user.nick ] = true; this.scores[ data.nick ] += 1; @@ -201,7 +201,7 @@ io.sockets.on( 'connection', function(socket){ game.join(data, socket); game.checkState(); io.sockets.emit('event-join', data); - socket.emit('event-state', this.getState()); + socket.emit('event-state', game.getState()); } ); socket.on( 'event-message', function(data){ game.pushMessage(data); |
