mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
clientbot: avoid adding empty nicks to the state
It looks like names replies may end with an extra space, which should not be considered as part of the nick list..
This commit is contained in:
parent
a8bb5f66e5
commit
f90b0c8577
@ -742,7 +742,7 @@ class ClientbotWrapperProtocol(ClientbotBaseProtocol, IRCCommonProtocol):
|
||||
|
||||
# N.B. only split on spaces because of color in hosts nonsense...
|
||||
# str.split() by default treats \x1f as whitespace
|
||||
for name in args[-1].split(' '):
|
||||
for name in args[-1].strip().split(' '):
|
||||
nick = name.lstrip(prefixes)
|
||||
|
||||
# Handle userhost-in-names where available.
|
||||
@ -754,6 +754,9 @@ class ClientbotWrapperProtocol(ClientbotBaseProtocol, IRCCommonProtocol):
|
||||
log.exception('(%s) Failed to split hostmask %r from /names reply on %s; args=%s', self.name, nick, channel, args)
|
||||
# If error, leave nick unsplit
|
||||
|
||||
if not nick:
|
||||
continue
|
||||
|
||||
# Get the PUID for the given nick. If one doesn't exist, spawn
|
||||
# a new virtual user.
|
||||
idsource = self._get_UID(nick, ident=ident, host=host)
|
||||
|
Loading…
Reference in New Issue
Block a user