Fix Rainbows again
parent
435e85319c
commit
4a152a9104
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue