mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-11-04 01:27:21 +01:00 
			
		
		
		
	Added check for duplicate module loading in load command
This commit is contained in:
		
							parent
							
								
									f82170de74
								
							
						
					
					
						commit
						7e8aab6619
					
				@ -289,6 +289,9 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
 | 
			
		||||
        Loads the plugin <plugin> from the plugins/ directory.
 | 
			
		||||
        """
 | 
			
		||||
        name = getArgs(args)
 | 
			
		||||
        if name in [cb.name() for cb in irc.callbacks]:
 | 
			
		||||
            irc.error('Sorry, that module is already loaded.')
 | 
			
		||||
            return
 | 
			
		||||
        try:
 | 
			
		||||
            moduleInfo = imp.find_module(name)
 | 
			
		||||
        except ImportError:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user