Fix Rainbows again

master
Sfan5 2013-11-09 20:53:47 +01:00
parent 435e85319c
commit 4a152a9104
1 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ import random
def colorize(text):
out = ""
for c in text:
if c in [(str(i) for i in range(10))]:
c = (u"\u200b".encode("utf8")) + c # 'ZERO WIDTH SPACE' cuz IRC clients are stupid
if c in list(str(i) for i in range(10)):
c = u"\u200b" + c # 'ZERO WIDTH SPACE' cuz IRC clients are stupid
out += "\x03" + str(random.randint(2, 15)) + c
return out
@ -20,7 +20,7 @@ def rainbow(phenny, input):
return # Abort function
arg = input.group(2)
if not arg:
phenny.say(colorize("Rainbow") + "What?")
return phenny.say(colorize("Rainbow") + "\x03 What?")
phenny.say(colorize(arg))
rainbow.commands = ['rainbow']