Fix another unicode screwup, by hackishly catching it in a somewhat common place
1 files changed, 4 insertions(+), 0 deletions(-) M mrgiggles.py
M mrgiggles.py +4 -0
@@ 205,6 205,10 @@ class CustomIRCBotProtocol(irc.IRCClient exec('from plugins.{name} import {klass}'.format(name=name, klass=info['class'])) self.plugins[name] = eval('%s(self, "%s")' % (info['class'], name)) + def msg(self, message, *args, **kwargs): + # Fix unicode BS + return irc.IRCClient.msg(self, message.encode('utf-8'), *args, **kwargs) + def process_batchlines(self, infh, outfh): for line in infh: line = line.rstrip()