From fab9f0fecc3bd713d59bc63ed2c6c4538cb927ce Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 19 Jan 2014 19:03:19 -0500 Subject: [PATCH] Change config readers bool logic to accept unrecognized values as yes --- src/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(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)