mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
cleintbot: only CAP END if we haven't registered yet
This commit is contained in:
parent
880714b2f2
commit
f42d49b8eb
@ -475,6 +475,7 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
"""
|
"""
|
||||||
logfunc = log.info if command == '903' else log.warning
|
logfunc = log.info if command == '903' else log.warning
|
||||||
logfunc('(%s) %s', self.irc.name, args[-1])
|
logfunc('(%s) %s', self.irc.name, args[-1])
|
||||||
|
if not self.has_eob:
|
||||||
self.irc.send('CAP END')
|
self.irc.send('CAP END')
|
||||||
handle_903 = handle_902 = handle_905 = handle_906 = handle_907 = handle_904
|
handle_903 = handle_902 = handle_905 = handle_906 = handle_907 = handle_904
|
||||||
|
|
||||||
@ -512,10 +513,12 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
# Only send CAP END immediately if SASL is disabled. Otherwise, wait for the 90x responses
|
# Only send CAP END immediately if SASL is disabled. Otherwise, wait for the 90x responses
|
||||||
# to do so.
|
# to do so.
|
||||||
if not self.saslAuth():
|
if not self.saslAuth():
|
||||||
|
if not self.has_eob:
|
||||||
self.irc.send('CAP END')
|
self.irc.send('CAP END')
|
||||||
elif subcmd == 'NAK':
|
elif subcmd == 'NAK':
|
||||||
log.warning('(%s) Got NAK for IRCv3 capabilities %s, even though they were supposedly available',
|
log.warning('(%s) Got NAK for IRCv3 capabilities %s, even though they were supposedly available',
|
||||||
self.irc.name, args[-1])
|
self.irc.name, args[-1])
|
||||||
|
if not self.has_eob:
|
||||||
self.irc.send('CAP END')
|
self.irc.send('CAP END')
|
||||||
elif subcmd == 'NEW':
|
elif subcmd == 'NEW':
|
||||||
# :irc.example.com CAP modernclient NEW :batch
|
# :irc.example.com CAP modernclient NEW :batch
|
||||||
|
Loading…
Reference in New Issue
Block a user