mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +01:00 
			
		
		
		
	clientbot: make unattended SASL reauth optional
This commit is contained in:
		
							parent
							
								
									68c618887f
								
							
						
					
					
						commit
						a96bb0ce11
					
				@ -298,6 +298,12 @@ servers:
 | 
			
		||||
        #sasl_username: "mIRCsKripterz"
 | 
			
		||||
        #sasl_password: "DownLoaditn00b!!!"
 | 
			
		||||
 | 
			
		||||
        # If this option is enabled, the bot will attempt SASL authentication even after it's
 | 
			
		||||
        # connected, as services become available throughout netsplits and reconnects.
 | 
			
		||||
        # Note: This requires an IRC server capable of IRCv3.2 cap-notify and sasl:
 | 
			
		||||
        # InspIRCd 3.x and charybdis 4+ (and derivatives) are some compatible examples (as of 2016-12-19)
 | 
			
		||||
        #sasl_reauth: true
 | 
			
		||||
 | 
			
		||||
        # Autoconnect works like usual.
 | 
			
		||||
        autoconnect: 30
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -530,8 +530,9 @@ class ClientbotWrapperProtocol(Protocol):
 | 
			
		||||
            self.ircv3_caps_available.update(newcaps)
 | 
			
		||||
            self.requestNewCaps()
 | 
			
		||||
 | 
			
		||||
            # Attempt SASL auth routines if sasl was added/removed
 | 
			
		||||
            if 'sasl' in newcaps:
 | 
			
		||||
            # Attempt SASL auth routines when sasl is added/removed, if doing so is enabled.
 | 
			
		||||
            if 'sasl' in newcaps and self.irc.serverdata.get('sasl_reauth'):
 | 
			
		||||
                log.debug('(%s) Attempting SASL reauth due to CAP NEW', self.irc.name)
 | 
			
		||||
                self.saslAuth()
 | 
			
		||||
 | 
			
		||||
        elif subcmd == 'DEL':
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user