mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Better string handling. If there's a particular reason why the .upper() calls were necessary, feel free to add them in.
This commit is contained in:
parent
f91a8199c7
commit
a08bf6b114
@ -130,10 +130,7 @@ class Currency(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
conv = text.split(',')[1]
|
conv = text.split(',')[1]
|
||||||
conv = number * float(conv)
|
conv = number * float(conv)
|
||||||
resp = [str(number), curr1.upper(), '=', str(conv), curr2.upper()]
|
irc.reply('%.2f %s = %.2f %s' % (number, curr1, conv, curr2))
|
||||||
if '.' not in resp[0] and 'e' not in resp[0]:
|
|
||||||
resp[0] = '%s.00' % resp[0]
|
|
||||||
irc.reply(' '.join(resp))
|
|
||||||
yahoo = wrap(yahoo, [optional('float', 1.0), 'lowered', 'to', 'lowered'])
|
yahoo = wrap(yahoo, [optional('float', 1.0), 'lowered', 'to', 'lowered'])
|
||||||
|
|
||||||
conf.registerPlugin('Currency')
|
conf.registerPlugin('Currency')
|
||||||
|
Loading…
Reference in New Issue
Block a user