diff options
author | Adam <Adam@anope.org> | 2014-01-19 19:03:19 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-01-19 19:03:19 -0500 |
commit | fab9f0fecc3bd713d59bc63ed2c6c4538cb927ce (patch) | |
tree | a62833701b157e8c763b14fc45132d669faac68e /src/config.cpp | |
parent | df8d85d80aae4af79293f52095ab487a745bef5a (diff) |
Change config readers bool logic to accept unrecognized values as yes
Diffstat (limited to 'src/config.cpp')
-rw-r--r-- | src/config.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp index 3dd7b6c69..734be17d3 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -97,7 +97,7 @@ template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def) template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const { const Anope::string &str = Get<const Anope::string>(tag, def); - return str.equals_ci("yes") || str.equals_ci("on") || str.equals_ci("true"); + return !str.empty() && !str.equals_ci("no") && !str.equals_ci("off") && !str.equals_ci("false") && !str.equals_ci("0"); } static void ValidateNotEmpty(const Anope::string &block, const Anope::string &name, const Anope::string &value) |