added an extra check related to the --require-config hashflag, causing a non-true value to be counted as not present.

This commit is contained in:
jesopo 2016-04-06 16:03:38 +01:00
parent 7f7a1f6d55
commit 20058c4b67
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -25,7 +25,8 @@ class ModuleManager(object):
return None
elif line_split[0] == "#--require-config" and len(
line_split) > 1:
if not line_split[1].lower() in self.bot.config:
if not line_split[1].lower() in self.bot.config or not self.bot.config[
line_split[1].lower()]:
# nope, required config option not present.
return None
elif line_split[0] == "#--require-module" and len(