3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-11 20:52:42 +01:00

clientbot: ignore WHO replies for clients we don't know

This fixes various KeyErrors, etc. when processing the WHO reply later on, as Clientbot doesn't track state for anyone who doesn't share a channel with or talks to the bot.

Reported by Kev`Bz via IRC.
This commit is contained in:
James Lu 2016-09-08 18:45:34 -07:00
parent d8990e8439
commit b43d714011

View File

@ -451,6 +451,10 @@ class ClientbotWrapperProtocol(Protocol):
realname = args[-1].split(' ', 1)[-1]
uid = self.irc.nickToUid(nick)
if uid is None:
log.debug("(%s) Ignoring extraneous /WHO info for %s", self.irc.name, nick)
return
self.updateClient(uid, 'IDENT', ident)
self.updateClient(uid, 'HOST', host)
self.updateClient(uid, 'GECOS', realname)