ChannelLogger: Fix Python 2 compatibility (again).

This commit is contained in:
Valentin Lorentz 2014-02-17 19:24:41 +00:00
parent 98076482b6
commit 0c58ab2e98

View File

@ -180,6 +180,8 @@ class ChannelLogger(callbacks.Plugin):
self.timestamp(log)
if self.registryValue('stripFormatting', channel):
s = ircutils.stripFormatting(s)
if sys.version_info[0] < 3:
s = s.decode()
log.write(s)
if self.registryValue('flushImmediately'):
log.flush()