irclib: fix error when SASL is supported but not enabled for a network

This commit is contained in:
James Lu 2015-06-12 18:07:27 -07:00
parent 9d93bc6991
commit c3ddc585b4

View File

@ -1040,7 +1040,7 @@ class Irc(IrcCommandDispatcher):
self.network, caps) self.network, caps)
self.state.capabilities_ack.update(caps) self.state.capabilities_ack.update(caps)
if 'sasl' in caps: if 'sasl' in caps and self.sasl:
self.sendMsg(ircmsgs.IrcMsg(command='AUTHENTICATE', args=(self.sasl.upper(),))) self.sendMsg(ircmsgs.IrcMsg(command='AUTHENTICATE', args=(self.sasl.upper(),)))
else: else:
self.sendMsg(ircmsgs.IrcMsg(command='CAP', args=('END',))) self.sendMsg(ircmsgs.IrcMsg(command='CAP', args=('END',)))