summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subbot.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/subbot.py b/subbot.py
index 5d309fb..8dc095f 100644
--- a/subbot.py
+++ b/subbot.py
@@ -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