mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 11:39:25 +01:00
clientbot: send CAP LS before NICK/USER so that it consistently gets a response before connect
Previously, SASL was failing on networks like freenode, as the connection completed before a CAP response was received.
(cherry picked from commit 9420f21680
)
This commit is contained in:
parent
df4acbf5d5
commit
b14ea4f051
@ -73,6 +73,8 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
if sendpass:
|
||||
f('PASS %s' % sendpass)
|
||||
|
||||
f('CAP LS 302')
|
||||
|
||||
# This is a really gross hack to get the defined NICK/IDENT/HOST/GECOS.
|
||||
# But this connection stuff is done before any of the spawnClient stuff in
|
||||
# services_support fires.
|
||||
@ -82,8 +84,6 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
f('USER %s 8 * :%s' % (ident, # TODO: per net realnames or hostnames aren't implemented yet.
|
||||
conf.conf["bot"].get("realname", "PyLink Clientbot")))
|
||||
|
||||
f('CAP LS 302')
|
||||
|
||||
# Note: clientbot clients are initialized with umode +i by default
|
||||
def spawnClient(self, nick, ident='unknown', host='unknown.host', realhost=None, modes={('i', None)},
|
||||
server=None, ip='0.0.0.0', realname='', ts=None, opertype=None,
|
||||
|
Loading…
Reference in New Issue
Block a user