mirror of
https://github.com/wownero/tippero.git
synced 2026-10-24 11:08:32 +02:00
Fix report mixing up win/loss, and make it a bit more compact
This commit is contained in:
+5
-3
@@ -395,10 +395,12 @@ def Report(link,cmd):
|
||||
lost+=long(redis_zscore(zdtname+"lost",tsd) or 0)
|
||||
if days in period.keys():
|
||||
if won>lost:
|
||||
balance_change="+"+AmountToString(won-lost)
|
||||
wonlost='lost'
|
||||
balance_change=AmountToString(won-lost)
|
||||
else:
|
||||
balance_change="-"+AmountToString(lost-won)
|
||||
link.send('%s: %d bets %s, %s wagered, %s house balance change' % (game,bets,period[days],AmountToString(wagered),balance_change))
|
||||
wonlost='won'
|
||||
balance_change=AmountToString(lost-won)
|
||||
link.send('%s, %s: %d bets, %s wagered, house %s %s' % (game,period[days],bets,AmountToString(wagered),wonlost,balance_change))
|
||||
except Exception,e:
|
||||
log_error('Failed to generate report for %s: %s' % (game,str(e)))
|
||||
link.send('Failed to generate report for %s' % game)
|
||||
|
||||
Reference in New Issue
Block a user