patch b2ed84c15eb61138a3ed6f39254b54a2e9536345
Author: E. Bosch <presidev@AT@gmail.com>
Date: Wed Feb 17 02:53:21 CET 2021
* irc: Improve the parsing
Recognize commands case insensitive: the RFCs are not very concise about
this and I don't know about clients sending commands in lower case but
just in case and it won't hurt
Line terminator: according RFCs should be \r\n but some clients only
send \n, I was confused about this but the parser must be robust and
now any combination of \r and \n is recognized
hunk ./irc.py 26
-PREFIX = r'(:[^ ]+ +|)'
+PREFIX = r'(?ai)(:[^ ]+ +|)'
hunk ./irc.py 65
- message = message.decode()
+ message = message.decode().replace('\r','\n')