irc: Fix whois handler when user doesn't exist
patch f8db901e130865d95c9a0a50ed1e0abe85a5a67a
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun Feb 27 01:05:16 CET 2022
* irc: Fix whois handler when user doesn't exist
diff -rN -u old-irgramd-1/irc.py new-irgramd-1/irc.py
--- old-irgramd-1/irc.py 2024-11-22 15:39:29.536829218 +0100
+++ new-irgramd-1/irc.py 2024-11-22 15:39:29.536829218 +0100
@@ -338,9 +338,9 @@
self.logger.debug('Handling WHOIS: %s', nicks)
for nick in nicks.split(','):
ni = nick.lower()
- real_ni = self.users[ni].irc_nick
if ni in self.users.keys():
usr = self.users[ni]
+ real_ni = usr.irc_nick
await self.reply_code(user, 'RPL_WHOISUSER', (real_ni, usr.irc_username, usr.address, usr.irc_realname))
await self.reply_code(user, 'RPL_WHOISSERVER', (real_ni, self.gethostname(user)))
chans = usr.get_channels(self)