3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-23 19:19:31 +01:00

clientbot: in nick(), make sure irc.pseudoclient exists

This commit is contained in:
James Lu 2016-08-27 20:39:35 -07:00
parent 42a104534a
commit 53de6542f6

View File

@ -179,7 +179,7 @@ class ClientbotWrapperProtocol(Protocol):
def nick(self, source, newnick):
"""STUB: Sends NICK changes."""
if source == self.irc.pseudoclient.uid:
if self.irc.pseudoclient and source == self.irc.pseudoclient.uid:
self.irc.send('NICK :%s' % newnick)
# No state update here: the IRCd will respond with a NICK acknowledgement if the change succeeds.
else: