mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Fix amount in tip log
This commit is contained in:
parent
15da80978d
commit
d3e4b99f99
1 changed files with 5 additions and 5 deletions
10
tipbot.py
10
tipbot.py
|
@ -250,17 +250,17 @@ def Tip(nick,data):
|
|||
except Exception,e:
|
||||
SendTo(sendto, "Usage: tip nick amount")
|
||||
return
|
||||
units=long(amount*coin)
|
||||
if units <= 0:
|
||||
SendTo(sendto, "Invalid amount")
|
||||
return
|
||||
|
||||
log_info("Tip: %s wants to tip %s %s" % (nick, who, AmountToString(amount)))
|
||||
log_info("Tip: %s wants to tip %s %s" % (nick, who, AmountToString(units)))
|
||||
try:
|
||||
balance = redis.hget("balances",nick)
|
||||
if balance == None:
|
||||
balance = 0
|
||||
balance=long(balance)
|
||||
units=long(amount*coin)
|
||||
if units <= 0:
|
||||
SendTo(sendto, "Invalid amount")
|
||||
return
|
||||
if units > balance:
|
||||
SendTo(sendto, "You only have %s" % (AmountToString(balance)))
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue