irc: Fix JOIN and NAMES command regular expressions
patch a9a417e6056eebbd3a05bfb65fc1c2a79808c12d
Author: E. Bosch <presidev@AT@gmail.com>
Date: Wed Feb 17 02:48:48 CET 2021
* irc: Fix JOIN and NAMES command regular expressions
diff -rN -u old-irgramd/irc.py new-irgramd/irc.py
--- old-irgramd/irc.py 2024-11-23 03:09:45.587053727 +0100
+++ new-irgramd/irc.py 2024-11-23 03:09:45.591053721 +0100
@@ -24,8 +24,8 @@
# IRC Regular Expressions
PREFIX = r'(:[^ ]+ +|)'
-IRC_JOIN_RX = re.compile(PREFIX + r'JOIN( +|\n)(?P<channels>[^ ]+)')
-IRC_NAMES_RX = re.compile(PREFIX + r'NAMES( +|\n)(?P<channels>[^ ]+)')
+IRC_JOIN_RX = re.compile(PREFIX + r'JOIN( +:| +|\n)(?P<channels>[^\n]+|)')
+IRC_NAMES_RX = re.compile(PREFIX + r'NAMES( +:| +|\n)(?P<channels>[^\n]+|)')
IRC_NICK_RX = re.compile(PREFIX + r'NICK( +:| +|\n)(?P<nick>[^\n]+|)')
IRC_PASS_RX = re.compile(PREFIX + r'PASS( +:| +|\n)(?P<password>[^\n]+|)')
IRC_PING_RX = re.compile(PREFIX + r'PING( +:| +|\n)(?P<payload>[^\n]+|)')