diff options
| author | 2018-09-13 13:35:05 +0100 | |
|---|---|---|
| committer | 2018-09-13 13:35:05 +0100 | |
| commit | 1eed727bc5a8efaded32035cd1922851d799156c (patch) | |
| tree | acc6efcca649bada764ec86781ca9d64d908d9c2 /ModuleManager.py | |
| parent | Oops, this isn't C#. (diff) | |
| signature | ||
Add !enablemodule and !disablemodule to modules.py
Diffstat (limited to 'ModuleManager.py')
| -rw-r--r-- | ModuleManager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ModuleManager.py b/ModuleManager.py index 56ad2323..a67cacad 100644 --- a/ModuleManager.py +++ b/ModuleManager.py @@ -78,10 +78,10 @@ class ModuleManager(object): else: self.bot.log.error("Module '%s' not loaded", [name]) - def load_modules(self, whitelist=None): + def load_modules(self, whitelist=[], blacklist=[]): for path in self.list_modules(): name = self._module_name(path) - if whitelist == None or name in whitelist: + if name in whitelist or (not whitelist and not name in blacklist): self.load_module(name) def unload_module(self, name): |
