From 4aeda51771f6fcc2b0d548fa33394af59038aedd Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 9 Feb 2010 05:35:19 +0000 Subject: Clean up documentation of connect blocks a bit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12410 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configparser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/configparser.cpp') diff --git a/src/configparser.cpp b/src/configparser.cpp index 558c49117..4a0c9b58d 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -429,7 +429,14 @@ bool ConfigTag::getBool(const std::string &key, bool def) if(!readString(key, result)) return def; - return (result == "yes" || result == "true" || result == "1" || result == "on"); + if (result == "yes" || result == "true" || result == "1" || result == "on") + return true; + if (result == "no" || result == "false" || result == "0" || result == "off") + return false; + + ServerInstance->Logs->Log("CONFIG",DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() + + " is not valid, ignoring"); + return def; } std::string ConfigTag::getTagLocation() -- cgit v1.2.3