From e0e33aaee808cf8d2f3121535bd446205bd971da Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Mon, 23 Feb 2015 11:24:26 +0000 Subject: [PATCH] Look for upper-case currency code xe.com's output now has the currency in upper-case, so modify the regexp to look for all-caps versions of our arguments. --- commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.py b/commands.py index 474a442..3876987 100755 --- a/commands.py +++ b/commands.py @@ -256,7 +256,7 @@ def currencyq(bot, cmd, nick, conn, public): targ = ("http://www.xe.com/ucc/convert.cgi?From=%s&To=%s" % (args[0], args[1])) try: currencypage = urllib.urlopen(targ).read() - match = re.search(r"(1 %s = [\d\.]+ %s)" % (args[0],args[1]),currencypage,re.MULTILINE) + match = re.search(r"(1 %s = [\d\.]+ %s)" % (args[0].upper(),args[1].upper()),currencypage,re.MULTILINE) if match == None: bot.automsg(public,nick,"Dear Chief Secretary, there is no money.") else: -- 2.30.2