Move multiword_replace later in the code

This commit is contained in:
Luke Rogers 2012-09-12 11:30:46 +12:00
parent f2e117eb07
commit c2f112b93e

View file

@ -9,7 +9,7 @@ color_codes = {
} }
with open("plugins/data/8ball_responses.txt") as f: 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("//")] f.readlines()if not line.startswith("//")]
@ -19,5 +19,5 @@ def eightball(input, me=None):
"in electronic form. Ask and it shall be answered!" "in electronic form. Ask and it shall be answered!"
# here we use voodoo magic to tell the future # 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) me("shakes the magic 8 ball... %s" % magic)