summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2017-08-04 14:40:36 +0200
committerJoel Rosdahl <joel@rosdahl.net>2017-08-04 14:40:36 +0200
commit4de216e87317b66714d183f5549557dad381d866 (patch)
tree4b2f6de991d3c89d9c21cfedc3e5f48abb9799d4 /miniircd
parentdeaf98d20ce996d13e9971efb16441c4417b7fe2 (diff)
downloadminiircd-4de216e87317b66714d183f5549557dad381d866.tar.gz
miniircd-4de216e87317b66714d183f5549557dad381d866.zip
Ignore non-UTF8 characters in input in Python 3 mode
I don't think that this is in line with the RFCs, but it seems like an OK limitation for now. Closes #32.
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd2
1 files changed, 1 insertions, 1 deletions
diff --git a/miniircd b/miniircd
index 2dec14c..0be254d 100755
--- a/miniircd
+++ b/miniircd
@@ -43,7 +43,7 @@ if PY3:
return msg.encode()
def socket_to_buffer(buf):
- return buf.decode()
+ return buf.decode(errors="ignore")
else:
def buffer_to_socket(msg):
return msg