Seen: Fix error if last message contained non-ascii characters.

This commit is contained in:
Valentin Lorentz 2013-05-24 19:36:54 +02:00
parent 2d4914bc99
commit 5691ce58a5

View File

@ -29,6 +29,7 @@
###
import re
import sys
import time
import supybot.log as log
@ -206,6 +207,8 @@ class Seen(callbacks.Plugin):
nick, channel,
utils.timeElapsed(time.time()-when))
if self.registryValue('showLastMessage', channel):
if sys.version_info[0] < 3:
said = said.decode('utf8')
reply = _('%s: %s') % (reply, said)
irc.reply(reply)
elif len(results) > 1: