3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

Irc: strip off \r from lines

This commit is contained in:
James Lu 2015-07-20 21:19:01 -07:00
parent b593b39421
commit 6efb59b8b7

View File

@ -124,6 +124,7 @@ class Irc():
break
while b'\n' in buf:
line, buf = buf.split(b'\n', 1)
line = line.strip(b'\r')
line = line.decode("utf-8")
log.debug("(%s) <- %s", self.name, line)
hook_args = self.proto.handle_events(self, line)