summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-01-19 19:03:19 -0500
committerAdam <Adam@anope.org>2014-01-19 19:03:19 -0500
commitfab9f0fecc3bd713d59bc63ed2c6c4538cb927ce (patch)
treea62833701b157e8c763b14fc45132d669faac68e /src/config.cpp
parentdf8d85d80aae4af79293f52095ab487a745bef5a (diff)
Change config readers bool logic to accept unrecognized values as yes
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp2
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)