From c2f112b93e549213a6fa7376aa3485f3391dd38f Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Wed, 12 Sep 2012 11:30:46 +1200 Subject: [PATCH] Move multiword_replace later in the code --- plugins/8ball.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/8ball.py b/plugins/8ball.py index b472188..4c7f56d 100755 --- a/plugins/8ball.py +++ b/plugins/8ball.py @@ -9,7 +9,7 @@ color_codes = { } with open("plugins/data/8ball_responses.txt") as f: - responses = [multiword_replace(line.strip(), color_codes) for line in + responses = [line.strip() for line in f.readlines()if not line.startswith("//")] @@ -19,5 +19,5 @@ def eightball(input, me=None): "in electronic form. Ask and it shall be answered!" # here we use voodoo magic to tell the future - magic = random.choice(responses) + magic = multiword_replace(random.choice(responses), color_codes) me("shakes the magic 8 ball... %s" % magic)