Configure irclib's line decoder to not fail on invalid utf-8
authorAlexander van Gessel (AI0867) <ai0867@gmail.com>
Sun, 4 Nov 2012 01:38:10 +0000 (02:38 +0100)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 7 Nov 2012 05:41:02 +0000 (00:41 -0500)
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
irkerd

diff --git a/irkerd b/irkerd
index 2aefe145c197e8d49260c098d23d99185bac88f3..4aa9d8a9665a1793a18275aa2ad91d8f02592e89 100755 (executable)
--- a/irkerd
+++ b/irkerd
@@ -214,6 +214,8 @@ class Connection:
                                                 nickname=self.nickname(),
                                                 username="irker",
                                                 ircname="irker relaying client")
+                            if hasattr(self.connection, "buffer"):
+                                self.connection.buffer.errors = 'replace'
                             self.status = "handshaking"
                             self.irker.debug(1, "XMIT_TTL bump (%s connection) at %s" % (self.servername, time.asctime()))
                             self.last_xmit = time.time()