mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-11-04 01:27:21 +01:00 
			
		
		
		
	Slight update to make the code a touch cleaner.
This commit is contained in:
		
							parent
							
								
									76a79b0d76
								
							
						
					
					
						commit
						250df8538c
					
				@ -57,14 +57,12 @@ import supybot.privmsgs as privmsgs
 | 
			
		||||
import supybot.registry as registry
 | 
			
		||||
import supybot.callbacks as callbacks
 | 
			
		||||
 | 
			
		||||
def ircToLowerOrInt(x):
 | 
			
		||||
    if isinstance(x, int):
 | 
			
		||||
        return x
 | 
			
		||||
    else:
 | 
			
		||||
        return ircutils.toLower(x)
 | 
			
		||||
 | 
			
		||||
class IrcStringAndIntDict(utils.InsensitivePreservingDict):
 | 
			
		||||
    key = staticmethod(ircToLowerOrInt)
 | 
			
		||||
    def key(self, x):
 | 
			
		||||
        if isinstance(x, int):
 | 
			
		||||
            return x
 | 
			
		||||
        else:
 | 
			
		||||
            return ircutils.toLower(x)
 | 
			
		||||
 | 
			
		||||
class SeenDB(plugins.ChannelUserDB):
 | 
			
		||||
    IdDict = IrcStringAndIntDict
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user