patch 8b7eaea88f73d7a7a2020a04fbb593cac51a9236 Author: E. Bosch Date: Sat Feb 13 23:56:18 CET 2021 * irc: reorder JOIN definitions diff -rN -u old-irgramd/irc.py new-irgramd/irc.py --- old-irgramd/irc.py 2024-11-23 06:08:03.318433331 +0100 +++ new-irgramd/irc.py 2024-11-23 06:08:03.322433325 +0100 @@ -24,12 +24,12 @@ # IRC Regular Expressions PREFIX = r'(:[^ ]+ +|)' +IRC_JOIN_RX = re.compile(PREFIX + r'JOIN( +|\n)(?P[^ ]+)') IRC_NICK_RX = re.compile(PREFIX + r'NICK( +:| +|\n)(?P[^\n]+|)') IRC_PASS_RX = re.compile(PREFIX + r'PASS( +:| +|\n)(?P[^\n]+|)') IRC_PING_RX = re.compile(PREFIX + r'PING( +:| +|\n)(?P[^\n]+|)') IRC_PRIVMSG_RX = re.compile(PREFIX + r'PRIVMSG( +|\n)(?P[^ ]+)( +:| +|\n)(?P[^\n]+|)') IRC_USER_RX = re.compile(PREFIX + r'USER( +|\n)(?P[^ ]+) +[^ ]+ +[^ ]+( +:| +|\n)(?P[^\n]+|)') -IRC_JOIN_RX = re.compile(PREFIX + r'JOIN( +|\n)(?P[^ ]+)') IRC_WHO_RX = re.compile(PREFIX + r'WHO( +:| +|\n)(?P[^\n]+|)') IRC_WHOIS_RX = re.compile(PREFIX + r'WHOIS( +:| +|\n)(?P[^\n]+|)') @@ -91,12 +91,12 @@ def initialize_irc(self): self.irc_handlers = ( # pattern handle register_required + (IRC_JOIN_RX, self.handle_irc_join, True), (IRC_NICK_RX, self.handle_irc_nick, False), (IRC_PASS_RX, self.handle_irc_pass, False), (IRC_PING_RX, self.handle_irc_ping, False), (IRC_PRIVMSG_RX, self.handle_irc_privmsg, True), (IRC_USER_RX, self.handle_irc_user, False), - (IRC_JOIN_RX, self.handle_irc_join, True), (IRC_WHO_RX, self.handle_irc_who, True), (IRC_WHOIS_RX, self.handle_irc_whois, True), )