mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +01:00 
			
		
		
		
	p10: rename checkCloakChange -> check_cloak_change (consistency) (#454)
This commit is contained in:
		
							parent
							
								
									c898da7378
								
							
						
					
					
						commit
						8f14cb238b
					
				@ -749,8 +749,8 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
 | 
			
		||||
        # P10 cloaks aren't as simple as just replacing the displayed host with the one we're
 | 
			
		||||
        # sending. Check for cloak changes properly.
 | 
			
		||||
        # Note: we don't need to send any hooks here, checkCloakChange does that for us.
 | 
			
		||||
        self.checkCloakChange(target)
 | 
			
		||||
        # Note: we don't need to send any hooks here, check_cloak_change does that for us.
 | 
			
		||||
        self.check_cloak_change(target)
 | 
			
		||||
 | 
			
		||||
    ### HANDLERS
 | 
			
		||||
 | 
			
		||||
@ -935,7 +935,7 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
                if ('+o', None) in parsedmodes:
 | 
			
		||||
                    self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC Operator'}])
 | 
			
		||||
 | 
			
		||||
            self.checkCloakChange(uid)
 | 
			
		||||
            self.check_cloak_change(uid)
 | 
			
		||||
 | 
			
		||||
            return {'uid': uid, 'ts': ts, 'nick': nick, 'realhost': realhost, 'host': host, 'ident': ident, 'ip': ip}
 | 
			
		||||
 | 
			
		||||
@ -949,13 +949,13 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
            # Update the nick TS.
 | 
			
		||||
            return {'newnick': newnick, 'oldnick': oldnick, 'ts': ts}
 | 
			
		||||
 | 
			
		||||
    def checkCloakChange(self, uid):
 | 
			
		||||
    def check_cloak_change(self, uid):
 | 
			
		||||
        """Checks for cloak changes (ident and host) on the given UID."""
 | 
			
		||||
        uobj = self.irc.users[uid]
 | 
			
		||||
        ident = uobj.ident
 | 
			
		||||
 | 
			
		||||
        modes = dict(uobj.modes)
 | 
			
		||||
        log.debug('(%s) checkCloakChange: modes of %s are %s', self.irc.name, uid, modes)
 | 
			
		||||
        log.debug('(%s) check_cloak_change: modes of %s are %s', self.irc.name, uid, modes)
 | 
			
		||||
 | 
			
		||||
        if 'x' not in modes:  # +x isn't set, so cloaking is disabled.
 | 
			
		||||
            newhost = uobj.realhost
 | 
			
		||||
@ -1211,7 +1211,7 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
 | 
			
		||||
        if target in self.irc.users:
 | 
			
		||||
            # Target was a user. Check for any cloak changes.
 | 
			
		||||
            self.checkCloakChange(target)
 | 
			
		||||
            self.check_cloak_change(target)
 | 
			
		||||
 | 
			
		||||
        return {'target': target, 'modes': changedmodes}
 | 
			
		||||
    # OPMODE is like SAMODE on other IRCds, and it follows the same modesetting syntax.
 | 
			
		||||
@ -1345,7 +1345,7 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
        self.irc.callHooks([target, 'CLIENT_SERVICES_LOGIN', {'text': accountname}])
 | 
			
		||||
 | 
			
		||||
        # Check for any cloak changes now.
 | 
			
		||||
        self.checkCloakChange(target)
 | 
			
		||||
        self.check_cloak_change(target)
 | 
			
		||||
 | 
			
		||||
    def handle_fake(self, numeric, command, args):
 | 
			
		||||
        """Handles incoming FAKE hostmask changes."""
 | 
			
		||||
@ -1355,8 +1355,8 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
        # Assume a usermode +f change, and then update the cloak checking.
 | 
			
		||||
        self.irc.applyModes(target, [('+f', text)])
 | 
			
		||||
 | 
			
		||||
        self.checkCloakChange(target)
 | 
			
		||||
        # We don't need to send any hooks here, checkCloakChange does that for us.
 | 
			
		||||
        self.check_cloak_change(target)
 | 
			
		||||
        # We don't need to send any hooks here, check_cloak_change does that for us.
 | 
			
		||||
 | 
			
		||||
    def handle_svsnick(self, source, command, args):
 | 
			
		||||
        """Handles SVSNICK (forced nickname change attempts)."""
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user