mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +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.
This commit is contained in:
		
							parent
							
								
									3281e1e8c2
								
							
						
					
					
						commit
						9420f21680
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user