patch eb5b15eba474680cab8764d0242229617d960e38 Author: E. Bosch Date: Thu Jun 15 01:15:43 CEST 2023 * irc: Add log for user registered (authorized in IRC) diff -rN -u old-irgramd/irc.py new-irgramd/irc.py --- old-irgramd/irc.py 2024-11-22 20:24:35.285654742 +0100 +++ new-irgramd/irc.py 2024-11-22 20:24:35.289654736 +0100 @@ -140,7 +140,7 @@ self.irc_channels_founder = collections.defaultdict(set) self.start_time = time.strftime('%a %d %b %Y %H:%M:%S %z') - self.service_user = IRCUser(None, ('Services',), self.conf['service_user'], + self.service_user = IRCUser(None, ('Services',''), self.conf['service_user'], 'Control', 'Telegram Service', is_service=True) self.users[self.conf['service_user'].lower()] = self.service_user @@ -427,6 +427,8 @@ # IRC functions async def register(self, user): + self.logger.info('Registered IRC user "%s" from %s:%s', user.irc_nick, user.address, user.port) + user.registered = True await self.send_greeting(user) await self.send_help(user) @@ -640,6 +642,7 @@ def __init__(self, stream, address, irc_nick=None, username='', realname=None, is_service=False): self.stream = stream self.address = address[0] + self.port = str(address[1]) self.from_localhost = True if address[0].split('.')[0] == '127' else False self.irc_nick = irc_nick self.irc_username = str(username) diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py --- old-irgramd/telegram.py 2024-11-22 20:24:35.289654736 +0100 +++ new-irgramd/telegram.py 2024-11-22 20:24:35.289654736 +0100 @@ -145,7 +145,7 @@ tg_nick = self.get_telegram_nick(user) tg_ni = tg_nick.lower() if not user.is_self: - irc_user = IRCUser(None, ('Telegram',), tg_nick, user.id, self.get_telegram_display_name(user)) + irc_user = IRCUser(None, ('Telegram',''), tg_nick, user.id, self.get_telegram_display_name(user)) self.irc.users[tg_ni] = irc_user self.tid_to_iid[user.id] = tg_nick self.irc.iid_to_tid[tg_ni] = user.id