diff options
-rw-r--r-- | subbot.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,6 +1,8 @@ #!/usr/bin/env python import irc.bot +import irc.buffer +import irc.client import json, time import urllib2 import sys @@ -23,6 +25,10 @@ def reload_backend(signum, frame): print >>sys.stderr, "Reloaded backend." signal.signal(signal.SIGUSR1, reload_backend) +class PermissiveDecodingLineBuffer(irc.buffer.DecodingLineBuffer): + errors = 'replace' +irc.client.ServerConnection.buffer_class = PermissiveDecodingLineBuffer + class TestBot(irc.bot.SingleServerIRCBot): def __init__(self, channel, nickname, server, port=6667): self.nickname_base = nickname |