|
@ -1327,13 +1327,20 @@ Currency.prototype.bets = function(status, data) { |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 'pool': |
|
|
case 'pool': |
|
|
if (__self.bets_board.length > 0) { |
|
|
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'Current betting pool is:'}); |
|
|
|
|
|
for (var i = 0; i < __self.bets_board.length; i++) { |
|
|
|
|
|
__self.irc.emit('message', {message:'+ ' + __self.bets_board[i].name + ' with ' + __self.bets_board[i].num + ' bets totaling ' + __self.bets_board[i].total}); |
|
|
|
|
|
|
|
|
function do_work() { |
|
|
|
|
|
if (__self.bets_board.length > 0) { |
|
|
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'Current betting pool is:'}); |
|
|
|
|
|
for (var i = 0; i < __self.bets_board.length; i++) { |
|
|
|
|
|
__self.irc.emit('message', {message:'+ ' + __self.bets_board[i].name + ' with ' + __self.bets_board[i].num + ' bets totaling ' + __self.bets_board[i].total}); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
__self.irc.emit('message', {message:__self.pre_text + 'No current bet.'}); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (__self.bets_response_reset) { |
|
|
|
|
|
__self.bets_response = setTimeout(function () {do_work();}, __self.bets_response_timer); |
|
|
} else { |
|
|
} else { |
|
|
__self.irc.emit('message', {message:__self.pre_text + 'No current bet.'}); |
|
|
|
|
|
|
|
|
setTimeout(function () {do_work();}, __self.bets_response_timer); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 'winner': |
|
|
case 'winner': |
|
|