From 853768acbe2fd6e5f506008de2be2b10698c1b4f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 9 Mar 2020 04:46:21 +0000 Subject: Remove support for 0/1 in getBool. These were compat for an ancient version from before getBool existed. --- src/configparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/configparser.cpp') diff --git a/src/configparser.cpp b/src/configparser.cpp index 2f84b971a..2fcd59d4a 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -639,10 +639,10 @@ bool ConfigTag::getBool(const std::string &key, bool def) if(!readString(key, result)) return def; - if (stdalgo::string::equalsci(result, "yes") || stdalgo::string::equalsci(result, "true") || stdalgo::string::equalsci(result, "on") || result == "1") + if (stdalgo::string::equalsci(result, "yes") || stdalgo::string::equalsci(result, "true") || stdalgo::string::equalsci(result, "on")) return true; - if (stdalgo::string::equalsci(result, "no") || stdalgo::string::equalsci(result, "false") || stdalgo::string::equalsci(result, "off") || result == "0") + if (stdalgo::string::equalsci(result, "no") || stdalgo::string::equalsci(result, "false") || stdalgo::string::equalsci(result, "off")) return false; ServerInstance->Logs.Log("CONFIG", LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() + -- cgit v1.3.1-10-gc9f91