Do not print balance again for 0

This commit is contained in:
moneromooo 2015-01-13 23:32:11 +00:00
parent 14af9b3eb2
commit fac37aa80b

View file

@ -90,6 +90,9 @@ def GetBalance(nick,chan,cmd):
balance = long(balance) balance = long(balance)
sbalance = AmountToString(balance) sbalance = AmountToString(balance)
if balance < coinspecs.atomic_units: if balance < coinspecs.atomic_units:
if balance == 0:
SendTo(sendto, "%s's balance is %s" % (nick, sbalance))
else:
SendTo(sendto, "%s's balance is %s (%.16g %s)" % (nick, sbalance, float(balance) / coinspecs.atomic_units, coinspecs.name)) SendTo(sendto, "%s's balance is %s (%.16g %s)" % (nick, sbalance, float(balance) / coinspecs.atomic_units, coinspecs.name))
else: else:
SendTo(sendto, "%s's balance is %s" % (nick, sbalance)) SendTo(sendto, "%s's balance is %s" % (nick, sbalance))