mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +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:
parent
d8990e8439
commit
b43d714011
@ -451,6 +451,10 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
realname = args[-1].split(' ', 1)[-1]
|
realname = args[-1].split(' ', 1)[-1]
|
||||||
uid = self.irc.nickToUid(nick)
|
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, 'IDENT', ident)
|
||||||
self.updateClient(uid, 'HOST', host)
|
self.updateClient(uid, 'HOST', host)
|
||||||
self.updateClient(uid, 'GECOS', realname)
|
self.updateClient(uid, 'GECOS', realname)
|
||||||
|
Loading…
Reference in New Issue
Block a user