3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

p10: fix message handling; sender numerics are not prefixed with ":" here

Regression from 8db238e869
This commit is contained in:
James Lu 2021-06-13 00:44:41 -07:00
parent 6ba99b302f
commit 8322817395

View File

@ -815,6 +815,16 @@ class P10Protocol(IRCS2SProtocol):
### HANDLERS
def handle_events(self, data):
"""
Events handler for the P10 protocol. This is mostly the same as RFC1459, with extra handling
for the fact that P10 does not send source numerics prefixed with a ":".
"""
# After the initial PASS & SERVER message, every following message should be prefixed
if self.uplink and not data.startswith(":"):
data = ':' + data
return super().handle_events(data)
def post_connect(self):
"""Initializes a connection to a server."""
ts = self.start_ts