From 9ffdc281023eadff02b0ccffc88bf81460edc36e Mon Sep 17 00:00:00 2001 From: Rebecca Stewart Date: Wed, 22 Feb 2012 15:46:45 -0500 Subject: [PATCH] fix .choose bugs --- modules/choose.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/choose.py b/modules/choose.py index b079346..63570ba 100644 --- a/modules/choose.py +++ b/modules/choose.py @@ -11,12 +11,11 @@ def choose(phenny, input): origterm = input.groups()[1] if not origterm: return phenny.say(".choose - for when you just can't decide") - origterm = origterm - c = re.findall(r'([^,]+)', input) + c = re.findall(r'([^,]+)', origterm) if len(c) == 1: - c = re.findall(r'(\S+)', input) + c = re.findall(r'(\S+)', origterm) if len(c) == 1: - return phenny.reply("%s" % (c)) + return phenny.reply("%s" % (c.strip())) fate = random.choice(c).strip() return phenny.reply("%s" % (fate)) choose.rule = (['choose'], r'(.*)')