LF and CRLF

self.buffer.split("\n") should be self.buffer.split("\r\n") (IRC servers return correct line endings (CRLF))

Note: I am not sure whether you have 'fixed' this in your code, but it should be like this.

(With 'fixed' I mean a quick and dirty fix)