mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 22:49:23 +01:00
Merge pull request #1013 from nyuszika7h/fix-timeout-on-no-sasl-cap
Fix registration timeout when SASL is refused
This commit is contained in:
commit
ba6f8fa619
@ -962,13 +962,12 @@ class Irc(IrcCommandDispatcher):
|
||||
elif self.sasl_username and self.sasl_password:
|
||||
self.sasl = 'plain'
|
||||
|
||||
if self.sasl:
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('REQ', 'sasl')))
|
||||
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('REQ', 'account-notify')))
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('REQ', 'extended-join')))
|
||||
|
||||
if not self.sasl:
|
||||
if self.sasl:
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('REQ', 'sasl')))
|
||||
else:
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('END',)))
|
||||
|
||||
if self.password:
|
||||
@ -1031,6 +1030,11 @@ class Irc(IrcCommandDispatcher):
|
||||
log.warning('%s: Server refused capability %r',
|
||||
self.network, cap)
|
||||
|
||||
if cap == 'sasl':
|
||||
self.queueMsg(ircmsgs.IrcMsg(
|
||||
command='CAP',
|
||||
args=('END',)))
|
||||
|
||||
def do903(self, msg):
|
||||
log.info('%s: SASL authentication successful', self.network)
|
||||
self.queueMsg(ircmsgs.IrcMsg(command='CAP', args=('END',)))
|
||||
|
Loading…
Reference in New Issue
Block a user