patch 116330830a0e51f1298aa6577eabdaacb8158d03 Author: E. Bosch Date: Sun Feb 14 00:38:08 CET 2021 * irc: Add error reply when there is a command not allowed when not registered Fix PING command: not allowed if not registered diff -rN -u old-irgramd/irc.py new-irgramd/irc.py --- old-irgramd/irc.py 2024-11-23 01:53:29.094261288 +0100 +++ new-irgramd/irc.py 2024-11-23 01:53:29.094261288 +0100 @@ -79,6 +79,8 @@ await handler(user, **params) else: await self.reply_code(user, 'ERR_NEEDMOREPARAMS') + else: + await self.reply_code(user, 'ERR_NOTREGISTERED', ('',), '*') if not matched and user.registered: await self.reply_code(user, 'ERR_UNKNOWNCOMMAND') @@ -94,7 +96,7 @@ (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_PING_RX, self.handle_irc_ping, True), (IRC_PRIVMSG_RX, self.handle_irc_privmsg, True), (IRC_USER_RX, self.handle_irc_user, False), (IRC_WHO_RX, self.handle_irc_who, True), diff -rN -u old-irgramd/irc_replies.py new-irgramd/irc_replies.py --- old-irgramd/irc_replies.py 2024-11-23 01:53:29.094261288 +0100 +++ new-irgramd/irc_replies.py 2024-11-23 01:53:29.094261288 +0100 @@ -50,7 +50,7 @@ 'ERR_NOLOGIN': ('444', 'No login'), 'ERR_SUMMONDISABLED': ('445', 'Summon disabled'), 'ERR_USERSDISABLED': ('446', 'Users disabled'), - 'ERR_NOTREGISTERED': ('451', 'Not registered'), + 'ERR_NOTREGISTERED': ('451', ':Not registered'), 'ERR_NEEDMOREPARAMS': ('461', 'Need more params'), 'ERR_ALREADYREGISTRED': ('462', 'Already registered'), 'ERR_NOPERMFORHOST': ('463', 'Insufficient permissions for host'),