Fix bug with rainbow when message contains numeric characters #SF3140981

This commit is contained in:
Valentin Lorentz 2011-01-22 09:59:19 +01:00
parent d29ca0a227
commit e6fc429701

View File

@ -391,7 +391,7 @@ class Filter(callbacks.Plugin):
Returns <text> colorized like a rainbow. Returns <text> colorized like a rainbow.
""" """
colors = utils.iter.cycle([4, 7, 8, 3, 2, 12, 6]) colors = utils.iter.cycle(['04', '07', '08', '03', '02', '12', '06'])
L = [self._color(c, fg=colors.next()) for c in text] L = [self._color(c, fg=colors.next()) for c in text]
irc.reply(''.join(L) + '\x03') irc.reply(''.join(L) + '\x03')
rainbow = wrap(rainbow, ['text']) rainbow = wrap(rainbow, ['text'])