shizmob / pydle

An IRCv3-compliant Python 3 IRC library.
BSD 3-Clause "New" or "Revised" License
154 stars 48 forks source link

on_raw_part raises a KeyError due to unexpected None #134

Closed theunkn0wn1 closed 4 years ago

theunkn0wn1 commented 4 years ago

When the Pydle client parts a channel, whether willingly (client initiated) or forcefully (kick / server initiated), a KeyError is raised.

This appears to be caused by trailing whitespace being incorrectly interpreted as a nickname.

https://github.com/Shizmob/pydle/blob/c040373514e564a26b624c6a8d52903bbd902055/pydle/features/rfc1459/client.py#L920-L926

Since " " isn't a valid username, the resulting logic that builds the list of users malfunctions, adding a None entry into a non-nullable field. image

caused by #114