PetterKraabol / Twitch-Python

Object-oriented Twitch API for Python developers
https://pypi.org/project/twitch-python
MIT License
214 stars 37 forks source link

Certain text can force IRC to crash #21

Open emwjacobson opened 4 years ago

emwjacobson commented 4 years ago

https://github.com/PetterKraabol/Twitch-Python/blob/60b52bd8ce35136bb0c3e640616726077ca7c15a/twitch/chat/irc.py#L35-L37

If a user types "Login authentication failed" in chat, regardless of if the IRC connection has actually failed, it will trigger the fatal logging and return from the active loop.

A suggested fix could be to check to make sure it was not sent via a PRIVMSG

if text.find('Login authentication failed') > 0 and text.find('PRIVMSG') == -1: