mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
IRCNetwork: use \r\n as separator instead of \n
CRLF is the standard way of doing this per RFC1459
This commit is contained in:
parent
51fb269d0d
commit
1172ca7387
@ -1347,7 +1347,7 @@ class IRCNetwork(PyLinkNetworkCoreWithUtils):
|
||||
# Safeguard against newlines in input!! Otherwise, each line gets
|
||||
# treated as a separate command, which is particularly nasty.
|
||||
data = data.replace('\n', ' ')
|
||||
encoded_data = data.encode(self.encoding, 'replace')[:510] + b"\n"
|
||||
encoded_data = data.encode(self.encoding, 'replace')[:510] + b"\r\n"
|
||||
|
||||
log.debug("(%s) -> %s", self.name, data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user