patch fd56f8eea3d9bba22d6597d934449795fb156101 Author: E. Bosch Date: Fri Jan 29 01:24:25 CET 2021 * irc: Handle user disconnection diff -rN -u old-irgramd/irc.py new-irgramd/irc.py --- old-irgramd/irc.py 2024-11-23 01:49:53.690602735 +0100 +++ new-irgramd/irc.py 2024-11-23 01:49:53.694602729 +0100 @@ -50,7 +50,13 @@ self.logger.debug('Running client connection from %s', user.address) while True: - message = await user.stream.read_until(b'\n') + try: + message = await user.stream.read_until(b'\n') + except tornado.iostream.StreamClosedError: + if user in self.users.values(): + del self.users[user.irc_nick] + del user + break message = message.decode() self.logger.debug(message) matched = False @@ -241,7 +247,7 @@ self.irc_nick = None self.irc_username = None self.irc_realname = None - self.registered = True + self.registered = False self.password = '' self.recv_pass = ''