mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Fix report mixing up win/loss, and make it a bit more compact
This commit is contained in:
parent
bb7d4c9f2c
commit
2cb01954d4
1 changed files with 5 additions and 3 deletions
|
@ -395,10 +395,12 @@ def Report(link,cmd):
|
||||||
lost+=long(redis_zscore(zdtname+"lost",tsd) or 0)
|
lost+=long(redis_zscore(zdtname+"lost",tsd) or 0)
|
||||||
if days in period.keys():
|
if days in period.keys():
|
||||||
if won>lost:
|
if won>lost:
|
||||||
balance_change="+"+AmountToString(won-lost)
|
wonlost='lost'
|
||||||
|
balance_change=AmountToString(won-lost)
|
||||||
else:
|
else:
|
||||||
balance_change="-"+AmountToString(lost-won)
|
wonlost='won'
|
||||||
link.send('%s: %d bets %s, %s wagered, %s house balance change' % (game,bets,period[days],AmountToString(wagered),balance_change))
|
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:
|
except Exception,e:
|
||||||
log_error('Failed to generate report for %s: %s' % (game,str(e)))
|
log_error('Failed to generate report for %s: %s' % (game,str(e)))
|
||||||
link.send('Failed to generate report for %s' % game)
|
link.send('Failed to generate report for %s' % game)
|
||||||
|
|
Loading…
Reference in a new issue