bitcoin: uppercase currencies for api

This commit is contained in:
mutantmonkey
2013-10-25 18:53:21 -07:00
parent d7654c65d1
commit 2e995476ee
2 changed files with 10 additions and 2 deletions

View File

@@ -20,15 +20,16 @@ def bitcoin(phenny, input):
"like .bitcoin 1 EUR")
return
if currency == 'BTC':
if currency.upper() == 'BTC':
from_btc = True
currency = input.group(4)
else:
from_btc = False
currency = currency.upper()
if not currency:
currency = 'USD'
currency = currency.strip()[:3]
currency = currency.strip()[:3].upper()
try:
amount = decimal.Decimal(amount)