Closed vikingsloth closed 7 years ago
The way the buffer class works, it yields full lines, as terminated by a LF (or maybe CRLF)... so if the FROM SERVER says that's what it's received, I'm inclined to trust it.
You can troubleshoot by overriding the default buffer behavior and asserting what the incoming bytes are:
import sys
from jaraco.stream import buffer
class DebuggingBuffer(buffer.DecodingLineBuffer):
def feed(self, bytes):
print("fed ", bytes, file=sys.stderr)
super(DebuggingBuffer, self).feed(bytes)
irc.client.ServerConnection.buffer_class = DebuggingBuffer
Run that somewhere before initiating your connection - then report back the fed
prefixed lines.
This was user error. I called self.userhost("tclient") but it should be self.userhost(["tclient"])
DEBUG:irc.client:TO SERVER: USERHOST t,c,l,i,e,n,t
The USERHOST command reply from the server gets truncated by the client.
A normal server response looks like this: