Fix amount in tip log

This commit is contained in:
moneromooo 2014-12-25 20:43:26 +00:00
parent 15da80978d
commit d3e4b99f99
1 changed files with 5 additions and 5 deletions

View File

@ -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