mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-02 15:44:06 +01:00
clientbot: auto-attempt SASL when it is introduced in CAP NEW
This commit is contained in:
parent
f42d49b8eb
commit
68c618887f
@ -526,9 +526,14 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
# Note: CAP NEW allows capabilities with values (e.g. sasl=mech1,mech2), while CAP DEL
|
# Note: CAP NEW allows capabilities with values (e.g. sasl=mech1,mech2), while CAP DEL
|
||||||
# does not.
|
# does not.
|
||||||
log.debug('(%s) Got new capabilities %s', self.irc.name, args[-1])
|
log.debug('(%s) Got new capabilities %s', self.irc.name, args[-1])
|
||||||
self.ircv3_caps_available.update(self.parseCapabilities(args[-1], None))
|
newcaps = self.parseCapabilities(args[-1], None)
|
||||||
|
self.ircv3_caps_available.update(newcaps)
|
||||||
self.requestNewCaps()
|
self.requestNewCaps()
|
||||||
|
|
||||||
|
# Attempt SASL auth routines if sasl was added/removed
|
||||||
|
if 'sasl' in newcaps:
|
||||||
|
self.saslAuth()
|
||||||
|
|
||||||
elif subcmd == 'DEL':
|
elif subcmd == 'DEL':
|
||||||
# :irc.example.com CAP modernclient DEL :userhost-in-names multi-prefix away-notify
|
# :irc.example.com CAP modernclient DEL :userhost-in-names multi-prefix away-notify
|
||||||
log.debug('(%s) Removing capabilities %s', self.irc.name, args[-1])
|
log.debug('(%s) Removing capabilities %s', self.irc.name, args[-1])
|
||||||
|
Loading…
Reference in New Issue
Block a user