3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +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 break
while b'\n' in buf: while b'\n' in buf:
line, buf = buf.split(b'\n', 1) line, buf = buf.split(b'\n', 1)
line = line.strip(b'\r')
line = line.decode("utf-8") line = line.decode("utf-8")
log.debug("(%s) <- %s", self.name, line) log.debug("(%s) <- %s", self.name, line)
hook_args = self.proto.handle_events(self, line) hook_args = self.proto.handle_events(self, line)