diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-09 05:35:19 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-09 05:35:19 +0000 |
commit | 4aeda51771f6fcc2b0d548fa33394af59038aedd (patch) | |
tree | 914fb2d77b25f913bf2ed4541b7463152931e75d /src | |
parent | 30ebb6b404236002478a0b570d0ab559d4effd13 (diff) |
Clean up documentation of connect blocks a bit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12410 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/configparser.cpp | 9 | ||||
-rw-r--r-- | src/users.cpp | 4 |
2 files changed, 12 insertions, 1 deletions
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() diff --git a/src/users.cpp b/src/users.cpp index c01b5d1b2..62bf0f543 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1646,6 +1646,10 @@ void LocalUser::SetClass(const std::string &explicit_name) continue; } + bool regdone = (registered != REG_NONE); + if (c->config->getBool("registered", regdone) != regdone) + continue; + /* we stop at the first class that meets ALL critera. */ found = c; break; |